sijms / go-ora

Pure go oracle client
MIT License
771 stars 169 forks source link

Panic in v2 Session.GetByte() #502

Closed bobvawter closed 6 months ago

bobvawter commented 6 months ago

I'm seeing a panic at https://github.com/sijms/go-ora/blob/812e431bd51edbadf738c54415bcd346e50e490d/v2/network/session.go#L1432 when the call to session.read(1) returns a zero-length slice, but does not return an error. This leads to an index out of bounds panic.

I can send a PR, but it's unclear if Session.GetByte() should create a new error in the above case, or if session.read() should send an error on an under-run situation. Thanks.

sijms commented 6 months ago

fixed in v2.8.7 I add error checking in read