]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
need va_copy before va_start
authorDamien Miller <djm@mindrot.org>
Thu, 15 Oct 2015 23:53:14 +0000 (10:53 +1100)
committerDamien Miller <djm@mindrot.org>
Thu, 15 Oct 2015 23:53:38 +0000 (10:53 +1100)
reported by Nicholas Lemonias

openbsd-compat/bsd-asprintf.c

index 3368195d443ae1a8470528ecf0211ccdfba17847..db57acce98f53233b1b309db2c87d6fc9d3d3840 100644 (file)
@@ -47,6 +47,7 @@ vasprintf(char **str, const char *fmt, va_list ap)
        char *string, *newstr;
        size_t len;
 
+       va_start(ap);
        VA_COPY(ap2, ap);
        if ((string = malloc(INIT_SZ)) == NULL)
                goto fail;