projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3436585
)
Patch from David Updegraff to avoid corrupting memory while parsing the
author
Eric Andersen
<andersen@codepoet.org>
Sat, 19 Apr 2003 23:15:06 +0000
(23:15 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Sat, 19 Apr 2003 23:15:06 +0000
(23:15 -0000)
networks/iterfaces file with next_word routine. Without this, next_word
increments one beyond the end of the string.
networking/ifupdown.c
patch
|
blob
|
history
diff --git
a/networking/ifupdown.c
b/networking/ifupdown.c
index fedae8dd6a282419a2b83d33657226283a6b7547..6c79c200426198e5341f0f720134f61e7a52999a 100644
(file)
--- a/
networking/ifupdown.c
+++ b/
networking/ifupdown.c
@@
-630,8
+630,11
@@
static char *next_word(char **buf)
return(NULL);
}
*buf = word + length;
- **buf = '\0';
- (*buf)++;
+ /*DBU:[dave@cray.com] if we are already at EOL dont't increment beyond it */
+ if (**buf) {
+ **buf = '\0';
+ (*buf)++;
+ }
return word;
}