summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-12-18 18:30:32 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-12-18 18:30:32 +0000
commit741aaf101632f259c5f6bd679a0979258d7a2241 (patch)
treec3e95faf1080ed51b790f02695837e9d8c9ef8a4
parent4e50c40cb07c1b37aca48029ed698033bb2af1b3 (diff)
fix segmentation fault in basename() and dirname()
SVN revision: 55632
-rw-r--r--legacy/evil/ChangeLog5
-rw-r--r--legacy/evil/src/lib/evil_libgen.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog
index 58bacac6d5..a23aaa8440 100644
--- a/legacy/evil/ChangeLog
+++ b/legacy/evil/ChangeLog
@@ -1,5 +1,10 @@
12010-12-18 Vincent Torri <doursse at users dot sf dot net> 12010-12-18 Vincent Torri <doursse at users dot sf dot net>
2 2
3 * src/lib/libgen.c:
4 fix segmentation fault in basename() and dirname()
5
62010-12-18 Vincent Torri <doursse at users dot sf dot net>
7
3 * src/lib/Evil.h: 8 * src/lib/Evil.h:
4 use _tzset instead of tzset with vc++ 9 use _tzset instead of tzset with vc++
5 10
diff --git a/legacy/evil/src/lib/evil_libgen.c b/legacy/evil/src/lib/evil_libgen.c
index 089bdb5f8f..3913050237 100644
--- a/legacy/evil/src/lib/evil_libgen.c
+++ b/legacy/evil/src/lib/evil_libgen.c
@@ -36,7 +36,7 @@ evil_basename(char *path)
36 return _evil_basename_buf; 36 return _evil_basename_buf;
37 } 37 }
38 p2 = p1; 38 p2 = p1;
39 while (p2) 39 while (*p2)
40 { 40 {
41 if (*p2 == '/') *p2 = '\\'; 41 if (*p2 == '/') *p2 = '\\';
42 p2++; 42 p2++;
@@ -86,7 +86,7 @@ evil_dirname(char *path)
86 return _evil_dirname_buf; 86 return _evil_dirname_buf;
87 } 87 }
88 p2 = p1; 88 p2 = p1;
89 while (p2) 89 while (*p2)
90 { 90 {
91 if (*p2 == '/') *p2 = '\\'; 91 if (*p2 == '/') *p2 = '\\';
92 p2++; 92 p2++;