From bdada0eacc11f6cfbf3256556d86282a0124ab26 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Mon, 20 Sep 2004 14:33:18 +0000 Subject: [PATCH 1/1] Add assert for invalid armor parameters. Add an assert if we had a NULL string to the armor_putchar function. Brett spotted this while doing evil things. --- armor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/armor.c b/armor.c index 6bb77d8..bb0085e 100644 --- a/armor.c +++ b/armor.c @@ -188,6 +188,8 @@ static int armor_putchar(void *ctx, size_t count, unsigned char *c) { int i; + log_assert(c != NULL); + for (i = 0; i < count; i++) { armor_putchar_int(ctx, c[i]); } -- 2.39.5