Skip to content
Commits on May 2, 2006
  1. @dscho

    cache-tree: replace a sscanf() by two strtol() calls

    dscho committed with Junio C Hamano May 2, 2006
    On one of my systems, sscanf() first calls strlen() on the buffer. But
    this buffer is not terminated by NUL. So git crashed.
    strtol() does not share that problem, as it stops reading after the
    first non-digit.
    [jc: original patch was wrong and did not read the cache-tree
     structure correctly; this has been fixed up and tested minimally
     with fsck-objects. ]
    Signed-off-by: Johannes Schindelin <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.