Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 145897

Summary: app-text/a2ps-4.13-r2 segfaults on amd64
Product: Gentoo Linux Reporter: Kevin F. Quinn (RETIRED) <kevquinn>
Component: [OLD] PrintingAssignee: CJK Team <cjk>
Status: RESOLVED FIXED    
Severity: normal CC: amd64, printing
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Replace incorrect use of memcpy with va_copy().

Description Kevin F. Quinn (RETIRED) gentoo-dev 2006-09-01 13:25:24 UTC
This shows up if the tests are run; the test that fails just does:

$ a2ps --list=options

which segfaults because the code is copying a va_list with memcpy, which is not valid.

It'll fail on any platform for which va_list is a 1-element array of a structure (see stdarg(3) for details).

Patch to follow.
Comment 1 Kevin F. Quinn (RETIRED) gentoo-dev 2006-09-01 13:27:12 UTC
Created attachment 95671 [details, diff]
Replace incorrect use of memcpy with va_copy().
Comment 2 Kevin F. Quinn (RETIRED) gentoo-dev 2006-09-01 13:28:36 UTC
Huh - fix is already in for later versions - oh well, I learned something even if it wasn't necessary to do anything!