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

Hartmut Brandt harti at FreeBSD.org
Thu Jun 2 02:17:22 PDT 2005


harti       2005-06-02 09:17:22 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_5)
    usr.bin/make         suff.c 
  Log:
  Fix a bug in suffix parsing. Under certain circumstances the code
  would access memory before the beginning of the string to match (the
  suffix match starts from the end of both the suffix and the string
  to match and proceedes 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. This leads to make dumping core on amd64 (on i386
  the overwritten memory for some reason does not cause a core dump).
  Fix this by checking the length of the string too.
  
  MFC of:         1.57
  Submitted by:   Matt Dillon <dillon at apollo.backplane.com>
  Tested by:      Julian H. Stacey <jhs at flat.berklix.net>
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.29.2.1  +13 -9     src/usr.bin/make/suff.c


More information about the cvs-src mailing list