Fix buffer underrun noted and solved by Larry Doolittle.

This commit is contained in:
Matt Kraai committed 2001-04-19 14:56:23 +00:00
1 parent 0a3bda2c53
commit 3ce79338e6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ extern int dirname_main(int argc, char **argv)
argv++;
s=*argv+strlen(*argv)-1;
while (s != *argv && *s == '/') {
while (s > *argv && *s == '/') {
*s-- = '\0';
}
s = strrchr(*argv, '/');
+1 -1
View File
@@ -37,7 +37,7 @@ extern int dirname_main(int argc, char **argv)
argv++;
s=*argv+strlen(*argv)-1;
while (s != *argv && *s == '/') {
while (s > *argv && *s == '/') {
*s-- = '\0';
}
s = strrchr(*argv, '/');