Closed nirosys closed 2 weeks ago
Need to update GHA for uploading ion-test-driver results, and MacOS tests (gcc 11 was removed from all MacOS images in August).
MacOS build addressed with #353.
ion-test-driver failures addressed in #354
Thank you @tgregg ! :)
Issue #, if available: Code Scanning 6
Description of changes: This PR addresses a comparison that was highlighted by gh code scanning. The original code contained:
Where both
stream->size()
andend_index
are of typesize_t
, which is unsigned. Ifend_index
is larger thanstream->size()
, the result will be a positive value, due to numeric overflow. If this were to happen,stream->at(end_index++)
would throw an exception, if exceptions are enabled, or abort the process if not.This PR re-words the comparison to highlight that we expect
end_index
to be less than the stream's size, and lessen the chance of overflow potential if the condition were to change later.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.