]> git.proxmox.com Git - mirror_lxc.git/commitdiff
parse: handle \r
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 10 Feb 2019 22:55:17 +0000 (23:55 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 10 Feb 2019 22:55:17 +0000 (23:55 +0100)
Closes #2838.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/parse.c

index 5abada058b5d38cba04b4301fa640b8a9f07520e..01068ccb34ba6cf50b91e963cc93e226b82a17bb 100644 (file)
@@ -131,7 +131,7 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *da
        }
 
        ret = 0;
-       lxc_iterate_parts(line, buf, "\n\0") {
+       lxc_iterate_parts(line, buf, "\r\n\0") {
                ret = callback(line, data);
                if (ret) {
                        /* Callback rv > 0 means stop here callback rv < 0 means