Closed Ranxy closed 1 year ago
would you please write an example code that produce the error
yes you are correct it should be if index + 1 >= Len(input)
I add a fix in v2.7.17 would you please test if issue is solved?
Sorry for not following this weekend. It seems that this fix doesn't handle the code for V2 https://github.com/sijms/go-ora/blob/v2.7.17/v2/converters/string_conversion.go#L206-L211
version in use
go 1.21.0
github.com/sijms/go-ora/v2 v2.7.14
panic stack
row.rowsi.data.Cols
The problem seems to be when encountering special data like this
BValue: []uint8 len: 3, cap: 64, [191,191,191]
https://github.com/sijms/go-ora/blob/v2.7.14/converters/string_conversion.go#L204-L208 will panic thebinary.BigEndian.Uint16(input[index:])
need two byte butif index+1 > len(input)
can only guarantee at least one byte