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

   ## Fix out-of-bounds write when CyclicBuffer is empty
   
   ### Problem
   `CyclicBuffer::resize` allows the buffer size to be set to `0`, but `add()` 
writes to the buffer without checking if storage exists.
   
   This can lead to an out-of-bounds write when the buffer is empty.
   
   ### Fix
   Add a simple guard in `CyclicBuffer::add` to return early when the buffer 
has no storage (`ea.empty()`).
   
   ### Impact
   - Prevents invalid memory access
   - No change in behaviour for valid buffer sizes
   - Minimal, localized fix


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