Fix: Add missing NULL termination in strings expanded by macros parser.
authorBartlomiej Sieka <tur@semihalf.com>
Sun, 27 May 2007 15:04:18 +0000 (17:04 +0200)
committerBartlomiej Sieka <tur@semihalf.com>
Sun, 27 May 2007 15:04:18 +0000 (17:04 +0200)
Signed-off-by: Piotr Kruszynski <ppk@semihalf.com>
Acked-by: Bartlomiej Sieka <tur@semihalf.com>
common/main.c

index cc4b50f615ab070c806773cfa57661f1dd889bbe..8f196a4828258c812ef7028c2d5ea873d7acac08 100644 (file)
@@ -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",