cvs commit: src/usr.bin/make suff.c

Max Okumoto okumoto at crater.dragonflybsd.org
Fri Mar 18 10:22:06 PST 2005


okumoto     2005/03/18 10:21:11 PST

DragonFly src repository

  Modified files:
    usr.bin/make         suff.c 
  Log:
  Patch originally from Matt, then modified by harti.
  
  FreeBSD-Date: 2005/03/18 15:16:09
  Author: matt, harti
  
  Fix a bug in matching suffixes. Under certain circumstances the code
  would access memory before the beginning of the string to match (the
  suffix match starts at the end of both the string and the suffix and
  proceedes to the begin until either the start of the suffix is hit
  or the character does not match). This could lead to a memcpy copying
  into random memory. Fix this by checking the length of the string to
  match too and replacing the Lst_Find calls with LST_FOREACH loops
  (last part by harti).
  
  Revision  Changes    Path
  1.48      +25 -44    src/usr.bin/make/suff.c


http://www.dragonflybsd.org/cvsweb/src/usr.bin/make/suff.c.diff?r1=1.47&r2=1.48&f=u





More information about the Commits mailing list