commit | d49fe11f82b7322d14584563c830961755e5688b | [log] [tgz] |
---|---|---|
author | fredgan <ganshaolong@vip.qq.com> | Mon Oct 21 20:51:50 2019 +0800 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Wed Oct 23 14:18:47 2019 +0200 |
tree | b887de8d5707b8d9335bf605d9e9237423346ebe | |
parent | 2b11ddb60ceb2a9e5732062984c00d4e094a45e7 [diff] |
YANG parser BUGFIX reading escaped characters in quoted strings The \t and \n sequence is actually stored as a single character so it modifies the resulting and to store it, a dynamically allocated buffer is needed.
diff --git a/src/parser_yang.c b/src/parser_yang.c index 314cbd7..ca713b9 100644 --- a/src/parser_yang.c +++ b/src/parser_yang.c
@@ -401,9 +401,11 @@ switch (**data) { case 'n': c = "\n"; + need_buf = 1; break; case 't': c = "\t"; + need_buf = 1; break; case '\"': c = *data;