paleolimbot commented on code in PR #985:
URL: https://github.com/apache/arrow-nanoarrow/pull/985#discussion_r4534133556
##########
src/nanoarrow/ipc/decoder.c:
##########
@@ -1701,7 +1701,8 @@ ArrowErrorCode ArrowIpcDecoderPeekFooter(struct
ArrowIpcDecoder* decoder,
const char* footer_size_data = magic - sizeof(int32_t);
if (memcmp(magic, NANOARROW_IPC_MAGIC, strlen(NANOARROW_IPC_MAGIC)) != 0) {
- ArrowErrorSet(error, "Expected file to end with ARROW1 but got %s",
data_end);
+ // data is not NUL-terminated: print only the bytes that were compared
+ ArrowErrorSet(error, "Expected file to end with ARROW1 but got %.6s",
magic);
Review Comment:
Realistically this should print out a few hex bytes...there's a very good
chance these are non printable characters that will get rendered here
--
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]