Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • lib
  • string_helpers.c
Find file BlameHistoryPermalink
  • Justin Stitt's avatar
    lib/string_helpers: rework overflow-dependent code · bbf3c7ff
    Justin Stitt authored Aug 08, 2024
    
    
    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: default avatarJustin Stitt <justinstitt@google.com>
    Link: https://lore.kernel.org/r/20240808-b4-string_helpers_caa133-v1-1-686a455167c4@google.com
    
    
    Signed-off-by: default avatarKees Cook <kees@kernel.org>
    bbf3c7ff
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7