Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v1.3.0
  • v1.2.4
  • v1.2.3
  • v1.2.2
  • v1.2.1
  • v1.2.0
  • v1.1.1
  • v1.1.0
  • v1.0.13
  • v1.0.12
  • v1.0.11
  • v1.0.10
  • v1.0.9
  • v1.0.8
  • v1.0.7
  • v1.0.6
  • v1.0.5
  • v1.0.4
  • v1.0.3
  • v1.0.2
21 results

test_fdopendir.c

Blame
    • Fred Wright's avatar
      e8d226b2
      test_fdopendir: Add fstatat() buffer overrun defense. · e8d226b2
      Fred Wright authored
      At the time of this writing, fstatat() may choose the wrong variant of
      stat to return, possibly overflowing the provided buffer.  To defend
      against this, we make the buffer the larger of the two possible sizes,
      and also move it off the stack for less verbosity when debugging.  See
      the comment in the code.
      
      TESTED:
      All versions pass, including previously crashing ino32 cases.
      e8d226b2
      History
      test_fdopendir: Add fstatat() buffer overrun defense.
      Fred Wright authored
      At the time of this writing, fstatat() may choose the wrong variant of
      stat to return, possibly overflowing the provided buffer.  To defend
      against this, we make the buffer the larger of the two possible sizes,
      and also move it off the stack for less verbosity when debugging.  See
      the comment in the code.
      
      TESTED:
      All versions pass, including previously crashing ino32 cases.