]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
sexp-conv: Fail with an error message for unexpected ']' characters.
authorNiels Möller <nisse@lysator.liu.se>
Tue, 16 Feb 2016 07:11:24 +0000 (08:11 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Tue, 16 Feb 2016 07:11:24 +0000 (08:11 +0100)
Fixes crash reported by Hanno Böck.

ChangeLog
tools/parse.c

index 8cb92085e0a6896a3cdb018e061595c2d1d47a38..8b430037b82f8cab4dfc05d14d8277cd71f35a33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-02-16  Niels Möller  <nisse@lysator.liu.se>
+
+       * tools/parse.c (sexp_parse): Fail with an error message for
+       unexpected ']' characters. Fixes crash reported by Hanno Böck.
+       Also handle SEXP_DISPLAY (internal error) explicitly, without a
+       default clause.
+
 2016-01-28  Niels Möller  <nisse@lysator.liu.se>
 
        * Released nettle-3.2.
index 008f3f14fa8073636e4e22d7691fcb1dd5dff42b..388139ad89ac0672f6746dd8a004778928c15e83 100644 (file)
@@ -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();
        }