Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/string_helpers: rework overflow-dependent code
When @SiZe is 0, the desired behavior is to allow unlimited bytes to be parsed. Currently, this relies on some intentional arithmetic overflow where --size gives us SIZE_MAX when size is 0. Explicitly spell out the desired behavior without relying on intentional overflow/underflow. Signed-off-by: Justin Stitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
- Loading branch information