projects
/
petitboot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c8683f
)
discover: Don't access bytes before the start of empty strings
author
Jeremy Kerr
<jk@ozlabs.org>
Fri, 10 May 2013 04:01:06 +0000
(12:01 +0800)
committer
Jeremy Kerr
<jk@ozlabs.org>
Wed, 15 May 2013 06:37:49 +0000
(14:37 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/parser-conf.c
patch
|
blob
|
history
diff --git
a/discover/parser-conf.c
b/discover/parser-conf.c
index 94612c326a6cdd35332443b1f5846878eafdd4fd..4bd23871bc6e6980c2dc3d785de0eeb3bad27a74 100644
(file)
--- a/
discover/parser-conf.c
+++ b/
discover/parser-conf.c
@@
-46,6
+46,9
@@
char *conf_strip_str(char *s)
if (!s)
return NULL;
+ if (!strlen(s))
+ return NULL;
+
while (*s == '"' || *s == '\'' || isspace(*s))
s++;