summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2016-01-03 23:01:24 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2016-01-03 23:01:24 +1100
commitd728ad59f53e72be21fe9bc419953c94aea798cc (patch)
tree86b77cc88b567674065f4acfbe466043d538340e /util.c
parent1ab2205a6f0f9e826a623e639da02787d372de37 (diff)
downloaddevice-tree-compiler-d728ad59f53e72be21fe9bc419953c94aea798cc.tar.gz
Fix crash on nul character in string escape sequence
If a dts file contains a string with \ followed by a nul byte - an actual nul in the input file, not the \\0 escape - then the assert() in get_escape_char() will trip, crashing dtc. As far as I can tell, there isn't any valid need for this assert(), so just remove it. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.c')
-rw-r--r--util.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/util.c b/util.c
index cbb945b..fb124ee 100644
--- a/util.c
+++ b/util.c
@@ -152,7 +152,6 @@ char get_escape_char(const char *s, int *i)
int j = *i + 1;
char val;
- assert(c);
switch (c) {
case 'a':
val = '\a';