1
0

patch-misc-utils_whereis_c 563 B

12345678910111213141516171819
  1. --- util-linux-ng-2.15.orig/misc-utils/whereis.c 2009-03-25 13:19:08.000000000 +0100
  2. +++ util-linux-ng-2.15/misc-utils/whereis.c 2009-06-22 22:51:39.000000000 +0200
  3. @@ -325,14 +325,14 @@ findin(char *dir, char *cp) {
  4. char dirbuf[1024];
  5. struct stat statbuf;
  6. - dd = index(dir, '*');
  7. + dd = strchr(dir, '*');
  8. if (!dd)
  9. goto noglob;
  10. l = strlen(dir);
  11. if (l < sizeof(dirbuf)) { /* refuse excessively long names */
  12. strcpy (dirbuf, dir);
  13. - d = index(dirbuf, '*');
  14. + d = strchr(dirbuf, '*');
  15. *d = 0;
  16. dirp = opendir(dirbuf);
  17. if (dirp == NULL)