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
  • include
  • linux
  • inetdevice.h
Find file BlameHistoryPermalink
  • Vincent BENAYOUN's avatar
    inetdevice: fixed signed integer overflow · 84bc8868
    Vincent BENAYOUN authored Nov 13, 2014
    
    
    There could be a signed overflow in the following code.
    
    The expression, (32-logmask) is comprised between 0 and 31 included.
    It may be equal to 31.
    In such a case the left shift will produce a signed integer overflow.
    According to the C99 Standard, this is an undefined behavior.
    A simple fix is to replace the signed int 1 with the unsigned int 1U.
    
    Signed-off-by: default avatarVincent BENAYOUN <vincent.benayoun@trust-in-soft.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    84bc8868
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7