summaryrefslogtreecommitdiff
path: root/user/mcpp/04-gniibe-fix-12.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/mcpp/04-gniibe-fix-12.patch')
-rw-r--r--user/mcpp/04-gniibe-fix-12.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/user/mcpp/04-gniibe-fix-12.patch b/user/mcpp/04-gniibe-fix-12.patch
new file mode 100644
index 000000000..13d29d62f
--- /dev/null
+++ b/user/mcpp/04-gniibe-fix-12.patch
@@ -0,0 +1,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. */