浏览代码

Fix: Add missing NULL termination in strings expanded by macros parser.

Signed-off-by: Piotr Kruszynski <ppk@semihalf.com>
Acked-by: Bartlomiej Sieka <tur@semihalf.com>
Bartlomiej Sieka 18 年之前
父节点
当前提交
9160b96f71
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      common/main.c

+ 2 - 0
common/main.c

@@ -1219,6 +1219,8 @@ static void process_macros (const char *input, char *output)
 
 	if (outputcnt)
 		*output = 0;
+	else
+		*(output - 1) = 0;
 
 #ifdef DEBUG_PARSER
 	printf ("[PROCESS_MACROS] OUTPUT len %d: \"%s\"\n",