patch-misc-utils_whereis_c 610 B

1234567891011121314151617181920
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- util-linux-2.12r.orig/misc-utils/whereis.c 2001-03-15 11:09:58.000000000 +0100
  3. +++ util-linux-2.12r/misc-utils/whereis.c 2008-10-16 11:50:03.000000000 +0200
  4. @@ -323,14 +323,14 @@ findin(char *dir, char *cp) {
  5. char dirbuf[1024];
  6. struct stat statbuf;
  7. - dd = index(dir, '*');
  8. + dd = strchr(dir, '*');
  9. if (!dd)
  10. goto noglob;
  11. l = strlen(dir);
  12. if (l < sizeof(dirbuf)) { /* refuse excessively long names */
  13. strcpy (dirbuf, dir);
  14. - d = index(dirbuf, '*');
  15. + d = strchr(dirbuf, '*');
  16. *d = 0;
  17. dirp = opendir(dirbuf);
  18. if (dirp == NULL)