Bug 688950 - gxfcopy.c: false assumption about pointer size in call to qsort(3)
Summary: gxfcopy.c: false assumption about pointer size in call to qsort(3)
Status: RESOLVED DUPLICATE of bug 688721
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 8.54
Hardware: All OpenBSD
: P4 major
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 07:49 UTC by Matthias Kilian
Modified: 2007-12-13 12:55 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Use sizeof(*a), not sizeof(in). (482 bytes, patch)
2006-10-19 07:51 UTC, Matthias Kilian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ***