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

   ## Summary
   
   Reject negative length and offset values when creating or modifying 
`DatagramPacket` instances.
   
   ## Changes
   
   * Add centralized validation for `DatagramPacket` length and offset 
arguments.
   * Reject negative length values in all constructors and mutators.
   * Reject negative offset values in all constructors and mutators.
   * Prevent invalid packet state from being stored and propagated.
   * Add regression tests covering negative constructor and mutation inputs.
   * Register the new test target in the helper test suite.
   
   ## Rationale
   
   `DatagramPacket` currently accepts negative length and offset values and 
stores them unchanged. This change enforces basic argument invariants at the 
`DatagramPacket` boundary and ensures invalid values are rejected before they 
can propagate through socket operations.
   
   ## Testing
   
   * Added constructor validation tests for negative length and offset values.
   * Added mutation validation tests for negative `setLength()` and `setData()` 
inputs.
   * Verified focused regression coverage for all supported negative-input 
paths.
   


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