Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe-x86
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomai
  • ipipe-x86
  • Repository
Switch branch/tag
  • ipipe-x86
  • drivers
  • md
  • dm-raid.c
Find file BlameHistoryPermalink
  • Dan Carpenter's avatar
    dm raid: fix a couple integer overflows · 3ca5a21a
    Dan Carpenter authored May 29, 2014
    
    
    My static checker complains that if "num_raid_params" is UINT_MAX then
    the "if (num_raid_params + 1 > argc) {" check doesn't work as intended.
    
    The other change is that I moved the "if (argc != (num_raid_devs * 2))"
    condition forward a few lines so it was before the call to
    context_alloc().  If we had an integer overflow inside that function
    then it would lead to an immediate crash.
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    3ca5a21a

Imprint & Privacy Policy