[lxc-devel] [lxc/master] parse: handle \r
brauner on Github
lxc-bot at linuxcontainers.org
Sun Feb 10 22:56:00 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 381 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190210/82618d1b/attachment.bin>
-------------- next part --------------
From 8336d7be2929fcae0d6ee8a27f60930d086f6185 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sun, 10 Feb 2019 23:55:17 +0100
Subject: [PATCH] parse: handle \r
Closes #2838.
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/parse.c b/src/lxc/parse.c
index 5abada058..01068ccb3 100644
--- a/src/lxc/parse.c
+++ b/src/lxc/parse.c
@@ -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
More information about the lxc-devel
mailing list