cvs commit: src/usr.bin/objformat objformat.c

Simon Schubert corecode at crater.dragonflybsd.org
Sun Aug 26 13:41:30 PDT 2007


corecode    2007/08/26 13:40:55 PDT

DragonFly src repository

  Modified files:
    usr.bin/objformat    objformat.c 
  Log:
  Correct off-by-one error.
  
  When comparing the command names, we might wind up behind the array,
  later dereferencing a dangling pointer.  Terminate the array correctly
  and stop processing soon enough.  Additionally, correct the error
  output to use errx(), as there is no meaningful errno available.
  
  Differing behavior spotted by use of tinycc.
  
  Revision  Changes    Path
  1.24      +4 -3      src/usr.bin/objformat/objformat.c


http://www.dragonflybsd.org/cvsweb/src/usr.bin/objformat/objformat.c.diff?r1=1.23&r2=1.24&f=u





More information about the Commits mailing list