tadeja commented on PR #50214:
URL: https://github.com/apache/arrow/pull/50214#issuecomment-4740336001

   @lriggs @kou welcome to already review this fix or re-do it differently.
   
   I saw the pr  
https://github.com/apache/arrow/pull/50112#discussion_r3384017956 regarding 
`160` for `char err_msg[160]` and I consulted šŸ¤– Claude Opus regarding this: 
   '_Buffer safety is independent of in_len_original and of the buffer size. 
snprintf(err_msg, sizeof(err_msg), 
   "…%.*s…", in_len_original, in_original) can never overflow err_msg. The 
sizeof bound caps the total bytes
   written; the %.*s precision only caps how many source bytes are read, and if 
that exceeds the remaining space
   the result is simply truncated, not overflowed. So 256, 160, 128, even 96 
are all equally safe — the only thing
   that changes is how much of the offending value the message shows before 
truncation._'
   
   Currently I set it to `128`, should be enough for the valuable beginning of 
the message printed.
   
   Jobs [C++ Extra / JNI ubuntu-latest 
amd64](https://github.com/apache/arrow/actions/runs/27745137529/job/82081554816?pr=50214)
 and [C++ Extra / JNI ubuntu-24.04-arm 
arm64/v8](https://github.com/apache/arrow/actions/runs/27745137529/job/82081554821?pr=50214)
 now pass with success.
   
   The CI job failures for ODBC, Python and R seem unrelated.


-- 
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]

Reply via email to