summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2016-02-16 08:11:24 +0100
committerNiels Möller <nisse@lysator.liu.se>2016-02-16 08:11:24 +0100
commit5606551f38a6e163b786a44d734bcd6e25c2d76c (patch)
tree5cf60e37eaf75bdb15634b77f64fa9320e6f959c /tools
parent10a857e029e920c55c9e157599c03929f7204889 (diff)
downloadnettle-5606551f38a6e163b786a44d734bcd6e25c2d76c.tar.gz
sexp-conv: Fail with an error message for unexpected ']' characters.
Fixes crash reported by Hanno Böck.
Diffstat (limited to 'tools')
-rw-r--r--tools/parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/parse.c b/tools/parse.c
index 008f3f14..388139ad 100644
--- a/tools/parse.c
+++ b/tools/parse.c
@@ -165,7 +165,10 @@ sexp_parse(struct sexp_parser *parser,
case SEXP_CODING_END:
die("Unexpected end of transport encoding.\n");
- default:
+ case SEXP_DISPLAY_END:
+ die("Unexpected end of display tag.\n");
+
+ case SEXP_DISPLAY:
/* Internal error. */
abort();
}