Commit 2a013587 authored by Kirill Smelkov's avatar Kirill Smelkov

decoder: Stack overflow handling fixes

I was going through decoder code and noticed in many places pickle
machine stack was popped / used without checks for overflow (whether
e.g. there are elements at all).

To catch/test the bugs the following approach can be used: we take all
our decoder test input vectors, and similar to a5094338 - where we were
truncating it at tail to test how unexpected EOF is handled, we can cut
some starting prefix from input and pass it to decode.

This way if there was some instructions to prepare data and later to use
the data, in skipped form there will be only "use data" instructions and
without data on stack and proper stack overflow handling it will panic.

Fix it all over the place.

For the reference here is how added test fails without actual decoder
fixes:

	ogorek_test.go:112: int: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: float: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: float: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: float: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: float: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[4:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[9:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[11:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[15:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[17:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[18:]: runtime error: index out of range
	ogorek_test.go:112: long: panic on input[20:]: runtime error: slice bounds out of range
	ogorek_test.go:112: long: panic on input[21:]: runtime error: slice bounds out of range
	ogorek_test.go:112: long: panic on input[23:]: runtime error: index out of range
	ogorek_test.go:112: None: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: empty tuple: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: empty tuple: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: tuple of two ints: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: tuple of two ints: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: tuple of two ints: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: tuple of two ints: panic on input[9:]: runtime error: index out of range
	ogorek_test.go:112: tuple of two ints: panic on input[11:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[9:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[20:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[23:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[24:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[25:]: runtime error: index out of range
	ogorek_test.go:112: nested tuples: panic on input[27:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 1 items from stack: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 1 items from stack: panic on input[3:]: runtime error: slice bounds out of range
	ogorek_test.go:112: tuple with top 1 items from stack: panic on input[4:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 2 items from stack: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 2 items from stack: panic on input[3:]: runtime error: slice bounds out of range
	ogorek_test.go:112: tuple with top 2 items from stack: panic on input[6:]: runtime error: slice bounds out of range
	ogorek_test.go:112: tuple with top 2 items from stack: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 3 items from stack: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 3 items from stack: panic on input[3:]: runtime error: slice bounds out of range
	ogorek_test.go:112: tuple with top 3 items from stack: panic on input[6:]: runtime error: slice bounds out of range
	ogorek_test.go:112: tuple with top 3 items from stack: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: tuple with top 3 items from stack: panic on input[9:]: runtime error: slice bounds out of range
	ogorek_test.go:112: tuple with top 3 items from stack: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: empty list: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: empty list: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: empty list: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: empty list: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[9:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[12:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[13:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[16:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[17:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[20:]: runtime error: index out of range
	ogorek_test.go:112: list of numbers: panic on input[21:]: runtime error: index out of range
	ogorek_test.go:112: string: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: string: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: string: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: string: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[11:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[16:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[18:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[20:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[21:]: runtime error: index out of range
	ogorek_test.go:112: unicode: panic on input[23:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[4:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[12:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[16:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[22:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[28:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[30:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[31:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[34:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[36:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[40:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[46:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[48:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[49:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[52:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[58:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[60:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[62:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[64:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[67:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[68:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[70:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[73:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[76:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[79:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[82:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[86:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[88:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[91:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[92:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[94:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[96:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[97:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[98:]: runtime error: index out of range
	ogorek_test.go:112: unicode2: panic on input[100:]: runtime error: index out of range
	ogorek_test.go:112: empty dict: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: empty dict: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: empty dict: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: empty dict: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[13:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[18:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[21:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[22:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[27:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[30:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[32:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[35:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[38:]: runtime error: index out of range
	ogorek_test.go:112: dict with strings: panic on input[39:]: runtime error: index out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[9:]: runtime error: index out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[17:]: runtime error: slice bounds out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[18:]: runtime error: index out of range
	ogorek_test.go:112: GLOBAL and REDUCE opcodes: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[4:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[11:]: runtime error: index out of range
	ogorek_test.go:112: LONG_BINPUT opcode: panic on input[12:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[9:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[12:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[13:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[15:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[16:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[17:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[20:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[22:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[23:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[32:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[41:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[50:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[53:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[59:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[68:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[77:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[80:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[86:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[89:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[95:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[104:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[113:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[122:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[131:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[140:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[149:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[150:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[151:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[152:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[154:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[155:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[156:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[157:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[158:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[159:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[161:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[165:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[166:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[168:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[169:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[170:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[171:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[172:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[174:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[179:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[181:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[183:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[184:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[186:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[190:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[191:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[194:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[196:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[197:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[199:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[205:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[214:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[223:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[232:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[242:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[246:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[248:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[249:]: runtime error: index out of range
	ogorek_test.go:112: graphite message1: panic on input[250:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[3:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[12:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[13:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[15:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[16:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[20:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[22:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[29:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[31:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[32:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[34:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[35:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[37:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[38:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[39:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[40:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[43:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[46:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[50:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[51:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[53:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[54:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[56:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[58:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[61:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[64:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[73:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[74:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[76:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[77:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[80:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[81:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[82:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[83:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[84:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[87:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[90:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[91:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[92:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[95:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[99:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[100:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[102:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[103:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[107:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[108:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[110:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[111:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[114:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[115:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[116:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[118:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[119:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[124:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[125:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[127:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[128:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[131:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[133:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[134:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[136:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[137:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[141:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[142:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[143:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[145:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[146:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[147:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[148:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[151:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[152:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[154:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[155:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[158:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[159:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[160:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[161:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[163:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[164:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[169:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[170:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[172:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[173:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[174:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[178:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[179:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[181:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[182:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[183:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[187:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[188:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[190:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[191:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[192:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[193:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[195:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[196:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[197:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[199:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[200:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[201:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[202:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[205:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[206:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[208:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[209:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[213:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[214:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[215:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[217:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[218:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[219:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[220:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[221:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[222:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[223:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[226:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[228:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[231:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[234:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[236:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[237:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[238:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[239:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[240:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[241:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[243:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[246:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[247:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[248:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[249:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[250:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[251:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[253:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[254:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[258:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[259:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[261:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[262:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[263:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[265:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[266:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[270:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[271:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[272:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[275:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[278:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[279:]: runtime error: index out of range
	ogorek_test.go:112: graphite message2: panic on input[280:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[2:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[5:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[6:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[7:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[10:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[15:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[16:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[18:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[20:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[23:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[26:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[27:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[28:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[31:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[32:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[35:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[36:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[37:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[39:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[41:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[42:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[43:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[47:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[50:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[52:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[53:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[54:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[58:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[59:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[60:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[61:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[63:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[64:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[67:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[70:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[71:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[74:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[75:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[76:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[77:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[81:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[84:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[85:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[86:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[88:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[89:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[90:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[91:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[92:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[95:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[98:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[99:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[100:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[103:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[104:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[107:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[109:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[110:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[111:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[115:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[116:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[117:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[118:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[119:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[120:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[121:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[122:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[123:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[125:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[128:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[129:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[130:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[132:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[133:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[136:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[137:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[138:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[140:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[141:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[142:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[143:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[144:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[148:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[151:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[152:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[153:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[154:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[155:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[157:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[158:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[161:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[163:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[164:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[165:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[169:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[170:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[171:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[172:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[173:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[175:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[178:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[182:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[183:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[186:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[187:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[188:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[190:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[191:]: runtime error: index out of range
	ogorek_test.go:112: graphite message3: panic on input[192:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[8:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[13:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[14:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[15:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[19:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[32:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[33:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[34:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[36:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[38:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[40:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[42:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[44:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[48:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[52:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[61:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[64:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[65:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[77:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[81:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[90:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[97:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[98:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[106:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[117:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[118:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[137:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[138:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[141:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[146:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[156:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[157:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[158:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[170:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[173:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[189:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[194:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[214:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[225:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[226:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[229:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[230:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[234:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[236:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[237:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[241:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[242:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[275:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[276:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[277:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[280:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[281:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[283:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[285:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[286:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[290:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[291:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[296:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[298:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[299:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[315:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[349:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[352:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[353:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[354:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[359:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[360:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[375:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[380:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[385:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[390:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[399:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[409:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[414:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[482:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[491:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[516:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[530:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[535:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[546:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[549:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[554:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[555:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[567:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[568:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[572:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[573:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[574:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[577:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[578:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[580:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[582:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[583:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[587:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[588:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[595:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[597:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[598:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[599:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[602:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[605:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[607:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[612:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[613:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[614:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[615:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[622:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[623:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[628:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[631:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[632:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[641:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[642:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[646:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[651:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[653:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[654:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[656:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[658:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[661:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[666:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[671:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[673:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[681:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[683:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[686:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[689:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[691:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[694:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[698:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[701:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[704:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[706:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[711:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[721:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[726:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[736:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[738:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[741:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[744:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[746:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[751:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[754:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[756:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[759:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[761:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[766:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[771:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[774:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[776:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[781:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[786:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[788:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[791:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[796:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[799:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[801:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[802:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[804:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[810:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[817:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[819:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[822:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[824:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[834:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[840:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[841:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[845:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[846:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[850:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[851:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[852:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[854:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[860:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[865:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[870:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[871:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[875:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[876:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[880:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[881:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[882:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[889:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[890:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[896:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[899:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[908:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[909:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[913:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[918:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[923:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[929:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[930:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[934:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[958:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[968:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[973:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[975:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[977:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[978:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[983:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[992:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1020:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1028:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1032:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1037:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1045:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1046:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1047:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1048:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1068:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1077:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1088:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1112:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1115:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1122:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1123:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1132:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1135:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1137:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1140:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1145:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1150:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1155:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1156:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1159:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1190:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1191:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1195:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1196:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1200:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1204:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1205:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1210:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1212:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1215:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1221:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1238:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1244:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1252:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1255:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1258:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1259:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1267:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1279:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1280:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1303:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1309:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1323:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1324:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1328:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1334:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1338:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1359:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1366:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1378:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1381:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1382:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1412:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1415:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1420:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1430:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1435:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1437:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1440:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1445:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1450:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1460:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1462:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1467:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1483:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1484:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1500:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1504:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1505:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1509:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1518:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1523:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1525:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1528:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1533:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1540:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1545:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1550:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1558:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1605:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1609:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1610:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1614:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1615:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1619:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1644:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1645:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1654:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1659:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1661:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1694:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1708:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1713:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1727:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1732:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1737:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1738:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1741:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1749:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1751:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1771:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1776:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1811:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1815:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1816:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1819:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1820:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1824:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1825:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1829:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1831:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1834:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1836:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1839:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1844:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1845:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1846:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1849:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1850:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1866:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1869:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1874:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1885:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1889:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1895:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1905:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1919:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1924:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1926:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1980:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[1986:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2000:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2001:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2010:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2011:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2020:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2031:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2056:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2059:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2061:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2069:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2074:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2091:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2095:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2101:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2115:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2125:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2136:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2145:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2148:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2156:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2174:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2185:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2190:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2195:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2199:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2211:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2212:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2213:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2217:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2218:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2225:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2226:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2228:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2256:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2261:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2262:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2265:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2266:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2270:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2275:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2281:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2285:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2290:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2295:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2300:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2301:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2302:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2317:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2320:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2324:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2326:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2327:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2345:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2346:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2351:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2355:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2365:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2370:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2375:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2377:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2380:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2382:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2385:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2386:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2387:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2400:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2414:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2424:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2428:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2431:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2433:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2436:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2458:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2466:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2467:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2477:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2489:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2506:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2511:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2520:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2521:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2535:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2536:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2541:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2559:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2563:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2565:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2566:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2568:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2587:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2588:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2589:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2592:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2593:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2595:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2599:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2607:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2629:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2639:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2653:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2654:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2658:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2663:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2668:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2677:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2678:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2684:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2693:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2699:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2726:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2727:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2728:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2729:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2732:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2734:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2743:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2751:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2753:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2768:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2769:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2773:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2783:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2784:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2793:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2802:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2803:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2807:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2817:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2822:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2859:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2862:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2863:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2867:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2868:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2869:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2872:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2873:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2877:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2878:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2882:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2884:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2887:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2892:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2897:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2902:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2907:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2913:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2917:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2922:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2924:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2928:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2932:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2962:]: runtime error: index out of range
	ogorek_test.go:112: too long line: panic on input[2970:]: runtime error: index out of range
	ogorek_test.go:112: FRAME Opcode and int: panic on input[12:]: runtime error: index out of range
	ogorek_test.go:112: SHORTBINUNICODE opcode: panic on input[11:]: runtime error: index out of range
	ogorek_test.go:112: SHORTBINUNICODE opcode: panic on input[12:]: runtime error: index out of range
parent be94c890
...@@ -86,6 +86,7 @@ const ( ...@@ -86,6 +86,7 @@ const (
var errNotImplemented = errors.New("unimplemented opcode") var errNotImplemented = errors.New("unimplemented opcode")
var ErrInvalidPickleVersion = errors.New("invalid pickle version") var ErrInvalidPickleVersion = errors.New("invalid pickle version")
var errNoMarker = errors.New("no marker in stack") var errNoMarker = errors.New("no marker in stack")
var errStackUnderflow = errors.New("pickle: stack underflow")
type OpcodeError struct { type OpcodeError struct {
Key byte Key byte
...@@ -141,11 +142,11 @@ loop: ...@@ -141,11 +142,11 @@ loop:
case opStop: case opStop:
break loop break loop
case opPop: case opPop:
d.pop() _, err = d.pop()
case opPopMark: case opPopMark:
d.popMark() d.popMark()
case opDup: case opDup:
d.dup() err = d.dup()
case opFloat: case opFloat:
err = d.loadFloat() err = d.loadFloat()
case opInt: case opInt:
...@@ -257,7 +258,7 @@ loop: ...@@ -257,7 +258,7 @@ loop:
return nil, err return nil, err
} }
} }
return d.pop(), nil return d.pop()
} }
func (d *Decoder) readLine() ([]byte, error) { func (d *Decoder) readLine() ([]byte, error) {
...@@ -285,11 +286,10 @@ func (d *Decoder) mark() { ...@@ -285,11 +286,10 @@ func (d *Decoder) mark() {
// Return the position of the topmost marker // Return the position of the topmost marker
func (d *Decoder) marker() (int, error) { func (d *Decoder) marker() (int, error) {
m := mark{} m := mark{}
var k int for k := len(d.stack) - 1; k >= 0; k-- {
for k = len(d.stack) - 1; d.stack[k] != m && k > 0; k-- { if d.stack[k] == m {
} return k, nil
if k >= 0 { }
return k, nil
} }
return 0, errNoMarker return 0, errNoMarker
} }
...@@ -300,10 +300,23 @@ func (d *Decoder) push(v interface{}) { ...@@ -300,10 +300,23 @@ func (d *Decoder) push(v interface{}) {
} }
// Pop a value // Pop a value
func (d *Decoder) pop() interface{} { // The returned error is errStackUnderflow if decoder stack is empty
func (d *Decoder) pop() (interface{}, error) {
ln := len(d.stack) - 1 ln := len(d.stack) - 1
if ln < 0 {
return nil, errStackUnderflow
}
v := d.stack[ln] v := d.stack[ln]
d.stack = d.stack[:ln] d.stack = d.stack[:ln]
return v, nil
}
// Pop a value (when you know for sure decoder stack is not empty)
func (d *Decoder) xpop() interface{} {
v, err := d.pop()
if err != nil {
panic(err)
}
return v return v
} }
...@@ -313,8 +326,12 @@ func (d *Decoder) popMark() error { ...@@ -313,8 +326,12 @@ func (d *Decoder) popMark() error {
} }
// Duplicate the top stack item // Duplicate the top stack item
func (d *Decoder) dup() { func (d *Decoder) dup() error {
if len(d.stack) < 1 {
return errStackUnderflow
}
d.stack = append(d.stack, d.stack[len(d.stack)-1]) d.stack = append(d.stack, d.stack[len(d.stack)-1])
return nil
} }
// Push a float // Push a float
...@@ -385,6 +402,9 @@ func (d *Decoder) loadLong() error { ...@@ -385,6 +402,9 @@ func (d *Decoder) loadLong() error {
if err != nil { if err != nil {
return err return err
} }
if len(line) < 1 {
return io.ErrUnexpectedEOF
}
v := new(big.Int) v := new(big.Int)
v.SetString(string(line[:len(line)-1]), 10) v.SetString(string(line[:len(line)-1]), 10)
d.push(v) d.push(v)
...@@ -448,8 +468,19 @@ type Call struct { ...@@ -448,8 +468,19 @@ type Call struct {
} }
func (d *Decoder) reduce() error { func (d *Decoder) reduce() error {
args := d.pop().([]interface{}) if len(d.stack) < 2 {
class := d.pop().(Class) return errStackUnderflow
}
xargs := d.xpop()
xclass := d.xpop()
args, ok := xargs.([]interface{})
if !ok {
return fmt.Errorf("pickle: reduce: invalid args: %T", xargs)
}
class, ok := xclass.(Class)
if !ok {
return fmt.Errorf("pickle: reduce: invalid class: %T", xclass)
}
d.stack = append(d.stack, Call{Callable: class, Args: args}) d.stack = append(d.stack, Call{Callable: class, Args: args})
return nil return nil
} }
...@@ -572,7 +603,10 @@ func (d *Decoder) loadBinUnicode() error { ...@@ -572,7 +603,10 @@ func (d *Decoder) loadBinUnicode() error {
} }
func (d *Decoder) loadAppend() error { func (d *Decoder) loadAppend() error {
v := d.pop() if len(d.stack) < 2 {
return errStackUnderflow
}
v := d.xpop()
l := d.stack[len(d.stack)-1] l := d.stack[len(d.stack)-1]
switch l.(type) { switch l.(type) {
case []interface{}: case []interface{}:
...@@ -631,6 +665,9 @@ func (d *Decoder) loadAppends() error { ...@@ -631,6 +665,9 @@ func (d *Decoder) loadAppends() error {
if err != nil { if err != nil {
return err return err
} }
if k < 1 {
return errStackUnderflow
}
l := d.stack[k-1] l := d.stack[k-1]
switch l.(type) { switch l.(type) {
...@@ -708,6 +745,9 @@ func (d *Decoder) loadTuple() error { ...@@ -708,6 +745,9 @@ func (d *Decoder) loadTuple() error {
} }
func (d *Decoder) loadTuple1() error { func (d *Decoder) loadTuple1() error {
if len(d.stack) < 1 {
return errStackUnderflow
}
k := len(d.stack) - 1 k := len(d.stack) - 1
v := append([]interface{}{}, d.stack[k:]...) v := append([]interface{}{}, d.stack[k:]...)
d.stack = append(d.stack[:k], v) d.stack = append(d.stack[:k], v)
...@@ -715,6 +755,9 @@ func (d *Decoder) loadTuple1() error { ...@@ -715,6 +755,9 @@ func (d *Decoder) loadTuple1() error {
} }
func (d *Decoder) loadTuple2() error { func (d *Decoder) loadTuple2() error {
if len(d.stack) < 2 {
return errStackUnderflow
}
k := len(d.stack) - 2 k := len(d.stack) - 2
v := append([]interface{}{}, d.stack[k:]...) v := append([]interface{}{}, d.stack[k:]...)
d.stack = append(d.stack[:k], v) d.stack = append(d.stack[:k], v)
...@@ -722,6 +765,9 @@ func (d *Decoder) loadTuple2() error { ...@@ -722,6 +765,9 @@ func (d *Decoder) loadTuple2() error {
} }
func (d *Decoder) loadTuple3() error { func (d *Decoder) loadTuple3() error {
if len(d.stack) < 3 {
return errStackUnderflow
}
k := len(d.stack) - 3 k := len(d.stack) - 3
v := append([]interface{}{}, d.stack[k:]...) v := append([]interface{}{}, d.stack[k:]...)
d.stack = append(d.stack[:k], v) d.stack = append(d.stack[:k], v)
...@@ -737,11 +783,17 @@ func (d *Decoder) loadPut() error { ...@@ -737,11 +783,17 @@ func (d *Decoder) loadPut() error {
if err != nil { if err != nil {
return err return err
} }
if len(d.stack) < 1 {
return errStackUnderflow
}
d.memo[string(line)] = d.stack[len(d.stack)-1] d.memo[string(line)] = d.stack[len(d.stack)-1]
return nil return nil
} }
func (d *Decoder) binPut() error { func (d *Decoder) binPut() error {
if len(d.stack) < 1 {
return errStackUnderflow
}
b, err := d.r.ReadByte() b, err := d.r.ReadByte()
if err != nil { if err != nil {
return err return err
...@@ -752,6 +804,9 @@ func (d *Decoder) binPut() error { ...@@ -752,6 +804,9 @@ func (d *Decoder) binPut() error {
} }
func (d *Decoder) longBinPut() error { func (d *Decoder) longBinPut() error {
if len(d.stack) < 1 {
return errStackUnderflow
}
var b [4]byte var b [4]byte
_, err := io.ReadFull(d.r, b[:]) _, err := io.ReadFull(d.r, b[:])
if err != nil { if err != nil {
...@@ -763,8 +818,11 @@ func (d *Decoder) longBinPut() error { ...@@ -763,8 +818,11 @@ func (d *Decoder) longBinPut() error {
} }
func (d *Decoder) loadSetItem() error { func (d *Decoder) loadSetItem() error {
v := d.pop() if len(d.stack) < 3 {
k := d.pop() return errStackUnderflow
}
v := d.xpop()
k := d.xpop()
m := d.stack[len(d.stack)-1] m := d.stack[len(d.stack)-1]
switch m.(type) { switch m.(type) {
case map[interface{}]interface{}: case map[interface{}]interface{}:
...@@ -781,6 +839,9 @@ func (d *Decoder) loadSetItems() error { ...@@ -781,6 +839,9 @@ func (d *Decoder) loadSetItems() error {
if err != nil { if err != nil {
return err return err
} }
if k < 1 {
return errStackUnderflow
}
l := d.stack[k-1] l := d.stack[k-1]
switch m := l.(type) { switch m := l.(type) {
...@@ -833,6 +894,9 @@ func (d *Decoder) loadShortBinUnicode() error { ...@@ -833,6 +894,9 @@ func (d *Decoder) loadShortBinUnicode() error {
} }
func (d *Decoder) loadMemoize() error { func (d *Decoder) loadMemoize() error {
if len(d.stack) < 1 {
return errStackUnderflow
}
d.memo[strconv.Itoa(len(d.memo))] = d.stack[len(d.stack)-1] d.memo[strconv.Itoa(len(d.memo))] = d.stack[len(d.stack)-1]
return nil return nil
} }
......
...@@ -100,6 +100,21 @@ func TestDecode(t *testing.T) { ...@@ -100,6 +100,21 @@ func TestDecode(t *testing.T) {
t.Errorf("%s: no ErrUnexpectedEOF on [:%d] truncated stream: v = %#v err = %#v", test.name, l, v, err) t.Errorf("%s: no ErrUnexpectedEOF on [:%d] truncated stream: v = %#v err = %#v", test.name, l, v, err)
} }
} }
// by using input with omitted prefix we can test how code handles pickle stack overflow:
// it must not panic
for i := 0; i < len(test.input); i++ {
buf := bytes.NewBufferString(test.input[i:])
dec := NewDecoder(buf)
func() {
defer func() {
if r := recover(); r != nil {
t.Errorf("%s: panic on input[%d:]: %v", test.name, i, r)
}
}()
dec.Decode()
}()
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment