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

Hartmut Brandt harti at FreeBSD.org
Fri Mar 18 07:16:10 PST 2005


harti       2005-03-18 15:16:09 UTC

  FreeBSD src repository

  Modified files:
    usr.bin/make         suff.c 
  Log:
  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 me).
  
  Submitted by:   Matt Dillon <dillon at apollo.backplane.com> (in principle)
  
  Revision  Changes    Path
  1.57      +25 -44    src/usr.bin/make/suff.c


More information about the cvs-src mailing list