]> the.earth.li Git - onak.git/commitdiff
Add assert for invalid armor parameters.
authorJonathan McDowell <noodles@earth.li>
Mon, 20 Sep 2004 14:33:18 +0000 (14:33 +0000)
committerJonathan McDowell <noodles@earth.li>
Mon, 20 Sep 2004 14:33:18 +0000 (14:33 +0000)
Add an assert if we had a NULL string to the armor_putchar function.
Brett spotted this while doing evil things.

armor.c

diff --git a/armor.c b/armor.c
index 6bb77d8d7406376c5f4abcf5b80b173fc7356905..bb0085e348d3b73846367b7bab80938e0cc75f21 100644 (file)
--- 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]);
        }