1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-10-31 20:08:43 +01:00

(vasprintf): ARGS should not be a pointer. Fixed

segv on Solaris.  Reported by Andrew J. Schorr.
This commit is contained in:
Werner Koch 2003-11-13 07:37:18 +00:00
parent dba40e5e45
commit 53272a25fc
3 changed files with 9 additions and 2 deletions

2
THANKS
View File

@ -1,3 +1,5 @@
Richard Lefebvre rick@CERCA.UMontreal.CA Richard Lefebvre rick@CERCA.UMontreal.CA
Andrew J. Schorr aschorr@telemetry-investments.com

View File

@ -1,3 +1,8 @@
2003-11-13 Werner Koch <wk@gnupg.org>
* vasprintf.c (vasprintf): ARGS should not be a pointer. Fixed
segv on Solaris. Reported by Andrew J. Schorr.
2003-11-12 Werner Koch <wk@gnupg.org> 2003-11-12 Werner Koch <wk@gnupg.org>
* maperror.c (map_ksba_err, map_gcry_err, map_kbx_err): Removed. * maperror.c (map_ksba_err, map_gcry_err, map_kbx_err): Removed.

View File

@ -31,7 +31,7 @@ int global_total_width;
#endif #endif
int int
vasprintf (char **result, const char *format, va_list *args) vasprintf (char **result, const char *format, va_list args)
{ {
const char *p = format; const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc /* Add one to make sure that it is never zero, which might cause malloc
@ -120,7 +120,7 @@ vasprintf (char **result, const char *format, va_list *args)
#endif #endif
*result = malloc (total_width); *result = malloc (total_width);
if (*result != NULL) if (*result != NULL)
return vsprintf (*result, format, *args); return vsprintf (*result, format, args);
else else
return 0; return 0;
} }