Author: delphij Date: Sat Apr 11 14:13:39 2009 New Revision: 190922 URL: http://svn.freebsd.org/changeset/base/190922
Log: MFC r190656: Fix a crash when corrupted data file is found. PR: bin/32686 Modified: stable/6/usr.bin/locate/ (props changed) stable/6/usr.bin/locate/locate/fastfind.c Modified: stable/6/usr.bin/locate/locate/fastfind.c ============================================================================== --- stable/6/usr.bin/locate/locate/fastfind.c Sat Apr 11 14:12:44 2009 (r190921) +++ stable/6/usr.bin/locate/locate/fastfind.c Sat Apr 11 14:13:39 2009 (r190922) @@ -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"