]> granicus.if.org Git - ipset/commitdiff
Accept "\r\n" terminated lines in restore files
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sat, 21 May 2011 21:10:14 +0000 (23:10 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sat, 21 May 2011 21:10:14 +0000 (23:10 +0200)
src/ipset.c

index b3569ed63eac8ec1eccb52f9db662ebae1623591..1f2dbcc0303d7c4038db7e65dd83e0ca8609341b 100644 (file)
@@ -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 {