File: fuzz_test.go

package info (click to toggle)
golang-github-hydrogen18-stalecucumber 0.0~git20180226.6de214d-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 280 kB
  • sloc: python: 71; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package stalecucumber

import (
	"strings"
	"testing"
)

func TestFuzzCrashers(t *testing.T) {

	var crashers = []string{
		"}}(s",       //protocol_0 SETITEM hash of unhashable
		"((d}d",      //protocol_0.go opcode_DICT hash of unhashable
		"}(}(a}u",    //protocol_1 SETITEMS hash of unhashable
		"(p0\nj0000", //pickle_machine flushMemoBuffer index out of range
	}

	for _, f := range crashers {
		Unpickle(strings.NewReader(f))
	}
}