projects
/
onak.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9fb5b5
)
Add assert for invalid armor parameters.
author
Jonathan McDowell
<noodles@earth.li>
Mon, 20 Sep 2004 14:33:18 +0000
(14:33 +0000)
committer
Jonathan 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
patch
|
blob
|
history
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]);
}