summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-asprintf.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:42:53 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:42:53 +0000
commit87552344215a38d3a2b0d4d63dc151e05978bbe1 (patch)
tree9f4b96055e6ccaa915e8d59d9f2805e9e119371d /openbsd-compat/bsd-asprintf.c
parenta25ec0b132c44c9e341e08464ff830de06b81126 (diff)
parentef94e5613d37bcbf880f21ee6094e4b1c7683a4c (diff)
import openssh-5.1p1-gsskex-cjwatson-20080722.patch
Diffstat (limited to 'openbsd-compat/bsd-asprintf.c')
-rw-r--r--openbsd-compat/bsd-asprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c
index 00fa0dfd8..3368195d4 100644
--- a/openbsd-compat/bsd-asprintf.c
+++ b/openbsd-compat/bsd-asprintf.c
@@ -55,6 +55,7 @@ vasprintf(char **str, const char *fmt, va_list ap)
55 if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */ 55 if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
56 *str = string; 56 *str = string;
57 } else if (ret == INT_MAX || ret < 0) { /* Bad length */ 57 } else if (ret == INT_MAX || ret < 0) { /* Bad length */
58 free(string);
58 goto fail; 59 goto fail;
59 } else { /* bigger than initial, realloc allowing for nul */ 60 } else { /* bigger than initial, realloc allowing for nul */
60 len = (size_t)ret + 1; 61 len = (size_t)ret + 1;