Author: delphij Date: Sat Apr 11 14:10:42 2009 New Revision: 190920 URL: http://svn.freebsd.org/changeset/base/190920
Log: MFC r190656: Fix a crash when corrupted data file is found. PR: bin/32686 Approved by: re (kib) Modified: stable/7/usr.bin/locate/ (props changed) stable/7/usr.bin/locate/locate/fastfind.c Modified: stable/7/usr.bin/locate/locate/fastfind.c ============================================================================== --- stable/7/usr.bin/locate/locate/fastfind.c Sat Apr 11 14:01:01 2009 (r190919) +++ stable/7/usr.bin/locate/locate/fastfind.c Sat Apr 11 14:10:42 2009 (r190920) @@ -216,6 +216,8 @@ fastfind count += c - OFFSET; } + if (count < 0 || count > MAXPATHLEN) + errx(1, "corrupted database: %s", database); /* overlay old path */ p = path + count; foundchar = p - 1; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"