fix a SEGV in previous commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2015-01-03 21:11:27 +01:00
parent f9936676bb
commit 402451aa19

View File

@ -223,7 +223,7 @@ static char *parse_common(FILE *fp, const char *filename,
* for 3 pointers: alignment padding, group name, NULL. * for 3 pointers: alignment padding, group name, NULL.
* +1 for every additional group. * +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; int cnt = 3;
char *p = buf; char *p = buf;
while (p < S.tokenize_end) while (p < S.tokenize_end)