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

Chris Pressey cpressey at crater.dragonflybsd.org
Tue Mar 1 23:21:38 PST 2005


cpressey    2005/03/01 23:20:44 PST

DragonFly src repository

  Modified files:
    usr.bin/checknr      checknr.c 
  Log:
  Improve data validation:
  - Simplify the check for a well-formed -a argument.
  - Move the check for overflowing the command table from addcmd()
    (which is just a driver) into addmac() (which does the real work,
    and which is called from places besides addcmd().)
  - Add a check for overflowing the macro-pair table.
  - In each case, use a clearer (while) loop for detecting overflow.
  - In each case, error out by using errx().
  
  Revision  Changes    Path
  1.10      +15 -9     src/usr.bin/checknr/checknr.c


http://www.dragonflybsd.org/cvsweb/src/usr.bin/checknr/checknr.c.diff?r1=1.9&r2=1.10&f=u





More information about the Commits mailing list