Bug 688950

Summary: gxfcopy.c: false assumption about pointer size in call to qsort(3)
Product: Ghostscript Reporter: Matthias Kilian <kili>
Component: GeneralAssignee: Default assignee <ghostpdl-bugs>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: P4    
Version: 8.54   
Hardware: All   
OS: OpenBSD   
Customer: Word Size: ---
Attachments: Use sizeof(*a), not sizeof(in).

Description Matthias Kilian 2006-10-19 07:49:29 UTC
in gxfcopy.c, there's a call to qsort(3) with an array of pointers as base but 
sizeof(int) given as the element size. This leads to all sorts of errors, 
including (but probably not limited to) bus errors on platforms where pointers 
have a different size then ints (e.g. on amd64). I'll attach a patch for this 
bug.
Comment 1 Matthias Kilian 2006-10-19 07:51:31 UTC
Created attachment 2544 [details]
Use sizeof(*a), not sizeof(in).
Comment 2 Alex Cherepanov 2006-10-19 08:23:31 UTC
Thank you for using and testing Ghostscript.
This bug has been already fixed in the current development version.

*** This bug has been marked as a duplicate of 688721 ***