It is not valid to copy va_list structures via memcpy; on some architectures va_list is a 1-element array of a structure (see stdarg(3) for details). The correct way to duplicate a va_list is to use va_copy(). Note this is only available in C99. Note; the contents of int_printflen can be moved to vprintflen and int_printflen deleted. Kevin F. Quinn 2006-09-01 diff -ur a2ps-4.13.orig/lib/printlen.c a2ps-4.13/lib/printlen.c --- a2ps-4.13.orig/lib/printlen.c 2006-09-01 22:08:14.000000000 +0200 +++ a2ps-4.13/lib/printlen.c 2006-09-01 22:13:50.000000000 +0200 @@ -28,14 +28,14 @@ unsigned long strtoul (); static int -int_printflen (const char *format, va_list *args) +int_printflen (const char *format, va_list args) { const char *cp; int total_width = 0; int width = 0; va_list ap; - memcpy (&ap, args, sizeof (va_list)); + va_copy(ap, args); for (cp = format ; *cp ; cp++) { @@ -93,13 +93,14 @@ } } } + va_end(ap); return total_width; } int vprintflen (const char *format, va_list args) { - return int_printflen (format, &args); + return int_printflen (format, args); } int