Skip to content
Snippets Groups Projects
Commit a8ff1805 authored by Niels Möller's avatar Niels Möller
Browse files

(sexp_vformat): Abort if format string contains

unhandled characters.

Rev: src/nettle/sexp-format.c:1.3
parent 75689999
No related branches found
No related tags found
No related merge requests found
/* sexp-output.c
/* sexp-format.c
*
* Writing s-expressions.
*/
......@@ -101,6 +101,9 @@ sexp_vformat(struct nettle_buffer *buffer, const char *format, va_list args)
for (;;)
switch (*format++)
{
default:
abort();
case '\0':
assert(!nesting);
......@@ -126,6 +129,9 @@ sexp_vformat(struct nettle_buffer *buffer, const char *format, va_list args)
case '%':
switch (*format++)
{
default:
abort();
case 'z':
{
const char *s = va_arg(args, const char *);
......@@ -242,8 +248,6 @@ sexp_vformat(struct nettle_buffer *buffer, const char *format, va_list args)
#endif /* ! HAVE_LIBGMP */
break;
}
default:
abort();
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment