shashank11yadav opened a new pull request, #1023: URL: https://github.com/apache/arrow-nanoarrow/pull/1023
Fixes #1022 `ArrowIpcDecoderDecodeFooter()` reads fields from the footer's schema table without checking that the footer has one. A footer without the optional `schema` field aborts in a Debug build. This adds the same check that `ArrowIpcDecoderVerifyFooter()` already has: when the footer has no schema, it sets the error message "Footer has no schema" and returns `EINVAL`. The public header says DecodeFooter returns `EINVAL` when the footer cannot be decoded. Test: adds `NanoarrowIpcTest.NanoarrowIpcFooterMissingSchema` in `src/nanoarrow/ipc/decoder_test.cc`. It uses a 22-byte footer with no schema and checks that both VerifyFooter and DecodeFooter return `EINVAL` with that message. How it was tested: - The new test passes with the fix and fails without it. - The full test suite passed: 431 tests, 16 tests skipped. - The clang-format check on the two changed files passed. Checklist: - [x] Tests added for the change - [ ] Lint (pre-commit hooks) passed on all files. Not run: the hooks need network access to fetch their repositories, which the test environment does not have. The clang-format check above covers only the two changed files. -- 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]
