zeroshade commented on code in PR #931:
URL: https://github.com/apache/arrow-go/pull/931#discussion_r3580663848
##########
arrow/cdata/cdata.go:
##########
@@ -686,6 +833,9 @@ func (imp *cimporter) importBinaryViewLike() (err error) {
if err = imp.checkNoChildren(); err != nil {
return
}
+ if _, err = checkedMul(int64(imp.arr.n_buffers-3),
int64(arrow.Int64SizeBytes)); err != nil {
Review Comment:
nit: `imp.arr.n_buffers-3` subtracts in C `int64_t` before the cast to Go
`int64`. It's safe today because `checkExpectedBuffers` already guarantees
`n_buffers >= 3` before this point, but casting first —
`int64(imp.arr.n_buffers) - 3` — is clearer and stays underflow-proof if that
ordering ever changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]