From: Jozsef Kadlecsik Date: Sat, 21 May 2011 21:10:14 +0000 (+0200) Subject: Accept "\r\n" terminated lines in restore files X-Git-Tag: v6.6~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=febfe6912c8322d13a4e2667ce9440f91a207cc5;p=ipset Accept "\r\n" terminated lines in restore files --- diff --git a/src/ipset.c b/src/ipset.c index b3569ed..1f2dbcc 100644 --- a/src/ipset.c +++ b/src/ipset.c @@ -148,9 +148,9 @@ build_argv(char *buffer) newargv[i] = NULL; newargc = 1; - ptr = strtok(buffer, " \t\n"); + ptr = strtok(buffer, " \t\r\n"); newargv[newargc++] = ptr; - while ((ptr = strtok(NULL, " \t\n")) != NULL) { + while ((ptr = strtok(NULL, " \t\r\n")) != NULL) { if ((newargc + 1) < (int)(sizeof(newargv)/sizeof(char *))) newargv[newargc++] = ptr; else {