wasphin opened a new pull request, #3658:
URL: https://github.com/apache/brpc/pull/3658

   ### What problem does this PR solve?
   
   Problem Summary:
   
   CRC32C verification assumes a four-byte checksum and reads it through a 
uint32_t pointer. Invalid lengths reach a CHECK, and the byte buffer need not 
provide uint32_t alignment.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Return false for checksum values whose length is not four bytes.
   - Decode the checksum with memcpy before verification.
   - Cover short and long checksum values, restoration of a valid value, and 
absence of CHECK failures.
   
   Side effects:
   - Performance effects: Skips checksum computation for invalid value lengths.
   - Breaking backward compatibility: None for valid inputs.
   
   ---
   ### Check List:
   - [x] Changes compile locally.
   - [x] Added focused regression coverage.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to