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:
f993667
)
fix a SEGV in previous commit
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 3 Jan 2015 20:11:27 +0000
(21:11 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 3 Jan 2015 20:11:27 +0000
(21:11 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libpwdgrp/pwd_grp.c
patch
|
blob
|
history
diff --git
a/libpwdgrp/pwd_grp.c
b/libpwdgrp/pwd_grp.c
index 01058d3a1b8a22d1b4d7c7b2feb147eba5d91c14..2392e7d2259fcf806e8cc026cccdeb9f0e89a0a2 100644
(file)
--- a/
libpwdgrp/pwd_grp.c
+++ b/
libpwdgrp/pwd_grp.c
@@
-223,7
+223,7
@@
static char *parse_common(FILE *fp, const char *filename,
* for 3 pointers: alignment padding, group name, NULL.
* +1 for every additional group.
*/
- if (n_fields == sizeof(GR_DEF)-1) { /* if we read group file... */
+ if (
buf &&
n_fields == sizeof(GR_DEF)-1) { /* if we read group file... */
int cnt = 3;
char *p = buf;
while (p < S.tokenize_end)