-
Notifications
You must be signed in to change notification settings - Fork 1.4k
bigquery: handleInsertErrors: equality check should be >=, not > #3519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report. Just to verify, were you seeing this behavior against the live service, or was this purely a byproduct of testing? |
External reporter identified case where improper bounds checking can cause panic when comparing the index value from structured error response. Fixes: googleapis#3519
Thanks for the fix! This was seen against the live service. For full context, though, the API caller does something fairly hacky where the row data is passed through http.RoundTripper as gzip-compressed bytes, and the |
Ahh ok, that would explain it. I was worried this was a signal of further issues with the backend. Will work on getting that fix submitted and released. |
🤖 I have created a release \*beep\* \*boop\* --- ## [1.15.0](https://www.github.com/googleapis/google-cloud-go/compare/bigquery/v1.14.0...v1.15.0) (2021-01-14) ### Features * **bigquery:** add reservation usage stats to query statistics ([#3403](https://www.github.com/googleapis/google-cloud-go/issues/3403)) ([112bcde](https://www.github.com/googleapis/google-cloud-go/commit/112bcdeb7cee1b44f337d3e5398a0d0820e93162)) * **bigquery:** add support for allowing Javascript UDFs to indicate determinism ([#3534](https://www.github.com/googleapis/google-cloud-go/issues/3534)) ([2f417a3](https://www.github.com/googleapis/google-cloud-go/commit/2f417a39d93402fbb1e5e3001645019782d7d656)), refs [#3533](https://www.github.com/googleapis/google-cloud-go/issues/3533) ### Bug Fixes * **bigquery:** address possible panic due to offset checking in handleInsertErrors ([#3524](https://www.github.com/googleapis/google-cloud-go/issues/3524)) ([5288511](https://www.github.com/googleapis/google-cloud-go/commit/52885115af3e95cdfd1ec784837fb1df7fe01446)), refs [#3519](https://www.github.com/googleapis/google-cloud-go/issues/3519) This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Client
BigQuery Go API
Environment
All
Go Environment
All
Code
https://github.com/googleapis/google-cloud-go/blob/bigquery/v1.14.0/bigquery/inserter.go#L226
The
>
checkshould be
>=
Otherwise, the next lines can attempt to access an out of range index:
Expected behavior
No out of bounds errors
Actual behavior
The text was updated successfully, but these errors were encountered: