Summary: | Bad sizeof() usage in psi/zfapi.c | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Tim Waugh <twaugh> |
Component: | General | Assignee: | Alex Cherepanov <alex> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chris.liddell |
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | Proposed patch |
Fixed in: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=2a3a32 I opted to replace the memcmp() in question with an explicit check for element equality. The reason I've opted for this is because, for example, [1 -0 0 1 0 0] == [1 0 0 1 0 0] which an explicit equality check will evaluate correctly, but a memcmp() will fail the check. Thanks for pointing out the problem! |
Created attachment 8057 [details] Proposed patch sizeof() needs the object, not its address. Found using Coverity.