summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Slice/Scanner.l8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l
index d212f82439d..cdad5358273 100644
--- a/cpp/src/Slice/Scanner.l
+++ b/cpp/src/Slice/Scanner.l
@@ -277,6 +277,10 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e
{
unput(next);
}
+ if(us == 0)
+ {
+ unit->error("illegal NUL character in string constant");
+ }
str->v += static_cast<char>(us);
break;
}
@@ -300,6 +304,10 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e
}
}
unput(next);
+ if(ull == 0)
+ {
+ unit->error("illegal NUL character in string constant");
+ }
str->v += static_cast<char>(ull);
break;
}