Date: Fri, 18 Mar 2005 15:16:09 +0000 (UTC) From: Hartmut Brandt <harti@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/make suff.c Message-ID: <200503181516.j2IFGARw008554@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@apollo.backplane.com> (in principle) Revision Changes Path 1.57 +25 -44 src/usr.bin/make/suff.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503181516.j2IFGARw008554>