]> granicus.if.org Git - file/commitdiff
try to fix memcpy (Jean-Louis CHARTON)
authorChristos Zoulas <christos@zoulas.com>
Thu, 17 Apr 2014 12:45:50 +0000 (12:45 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 17 Apr 2014 12:45:50 +0000 (12:45 +0000)
src/vasprintf.c

index 648dda474e46f6a9af966dea27393d0ac5164190..b5bfd64f5d88f03c9667624d09775d88099c5aef 100644 (file)
@@ -108,7 +108,7 @@ you use strange formats.
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: vasprintf.c,v 1.10 2012/08/09 16:40:04 christos Exp $")
+FILE_RCSID("@(#)$File: vasprintf.c,v 1.11 2014/04/17 12:45:50 christos Exp $")
 #endif /* lint */
 
 #include <assert.h>
@@ -639,7 +639,7 @@ int vasprintf(char **ptr, const char *format_string, va_list vargs)
 #ifdef __va_copy
   __va_copy (s.vargs, vargs);
 #else
-  memcpy (&s.vargs, vargs, sizeof (va_list));
+  memcpy (&s.vargs, &vargs, sizeof (s.va_args));
 #endif /* __va_copy */
 #endif /* va_copy */
   s.maxlen = (size_t)INT_MAX;