jmestwa-coder opened a new pull request, #682:
URL: https://github.com/apache/logging-log4cxx/pull/682

   ## Summary
   Fix SyslogAppender packet splitting when large chunk counts cause the 
`(x/y)` suffix to exceed the reserved suffix space.
   
   ## What changed
   - Replaced iterator-based splitting with bounded `size_t` index arithmetic.
   - Added suffix-aware chunk sizing to keep emitted payloads within 
`MaxMessageLength`.
   - Added explicit handling for cases where the full `(x/y)` suffix cannot fit 
alongside payload data.
   - Replaced fixed `apr_snprintf` suffix formatting with 
`StringHelper::toString`.
   - Added defensive guards around packet reservation for extremely large 
message counts.
   
   ## Behavior
   - Normal packet splitting behavior is preserved for standard message sizes.
   - When the suffix cannot fit within `MaxMessageLength`, the appender now 
omits the suffix instead of emitting oversized packets.
   - A warning is logged when suffix omission occurs.
   
   ## Tests
   Added regression coverage for:
   - one-byte remainder splitting boundaries
   - large chunk-count suffix growth
   - payload length invariant enforcement
   - impossible suffix-fit scenarios
   
   ## Result
   Ensures emitted SyslogAppender payloads remain bounded by `MaxMessageLength` 
across large message and packet-count edge cases.


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