From owner-cvs-all@FreeBSD.ORG Thu Jun 2 09:17:22 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97D8A16A41C; Thu, 2 Jun 2005 09:17:22 +0000 (GMT) (envelope-from harti@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79E5C43D1D; Thu, 2 Jun 2005 09:17:22 +0000 (GMT) (envelope-from harti@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j529HMVR033944; Thu, 2 Jun 2005 09:17:22 GMT (envelope-from harti@repoman.freebsd.org) Received: (from harti@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j529HMKQ033943; Thu, 2 Jun 2005 09:17:22 GMT (envelope-from harti) Message-Id: <200506020917.j529HMKQ033943@repoman.freebsd.org> From: Hartmut Brandt Date: Thu, 2 Jun 2005 09:17:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Cc: Subject: cvs commit: src/usr.bin/make suff.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2005 09:17:22 -0000 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 Tested by: Julian H. Stacey MFC after: 2 weeks Revision Changes Path 1.29.2.1 +13 -9 src/usr.bin/make/suff.c