Package: mcpp / 2.7.2-5

04-gniibe-fix-12.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix for a bug reported to sourceforge.net #12
Author: NIIBE Yutaka

Index: mcpp/src/support.c
===================================================================
--- mcpp.orig/src/support.c
+++ mcpp/src/support.c
@@ -1948,6 +1948,9 @@ static char *   get_line(
             dump_string( NULL, ptr);
         }
         len = strlen( ptr);
+        if (len == 0)
+                cwarn( "null character ignored", NULL, 0L, NULL);
+
         if (NBUFF - 1 <= ptr - infile->buffer + len
                 && *(ptr + len - 1) != '\n') {
                 /* The line does not yet end, though the buffer is full.    */