Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
G
git2
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • lvzhengyang
  • git2
  • Repository

Switch branch/tag
  • git2
  • fuzzers
  • corpora
  • midx
  • 666a779eed16847c6930a71c0547a34e52db409e
Find file
HistoryPermalink
  • lhchavez's avatar
    [midx] Fix an undefined behavior (left-shift signed overflow) · 33b1d3fd
    There was a missing check to ensure that the `off64_t` (which is a
    signed value) didn't overflow when parsing it from the midx file. This
    shouldn't have huge repercusions since the parsed value is immediately
    validated afterwards, but then again, there is no such thing as "benign"
    undefined behavior.
    
    This change makes all the bitwise arithmetic happen with unsigned types
    and is only casted to `off64_t` until the very end.
    
    Thanks to Taotao Gu for finding and reporting this!
    lhchavez committed Apr 05, 2022
    33b1d3fd
666a779eed16847c6930a71c0547a34e52db409e 62 Bytes

Download (62 Bytes)