New Ghostscript/GhostPDL compiler warnings - 2017-11-08-02:15:08 - e1aead165e05e98ae765d6569f39ced839d4298e

[email protected]
Newsgroups gmane.comp.printing.ghostscript.regression
Message-ID <20171108115254.BE93720401AF@i7>
Previous Revision: 1fb022758a35502b8e299248dd37207c1abc3ffe
 Current Revision: e1aead165e05e98ae765d6569f39ced839d4298e

commit e1aead165e05e98ae765d6569f39ced839d4298e
Author:     Ken Sharp <[email protected]>
AuthorDate: Wed Nov 8 10:04:03 2017 +0000
CommitDate: Wed Nov 8 10:04:03 2017 +0000

    Guard against divide-by-zero exceptions in the halftone code
    
    Bug #697663 "FPE in gx_compute_cell_values()"
    Bug #698332 "FPE (Division by zero) in pick_cell_size()"
    
    These have the same root cause, in pick_cell_size() we can end up with
    halftone cell parameters which are (I think) improperly initialised.
    
    Certainly its possible to get to the point where we divide using one
    of the parameters, and if its 0 we get an error. I suspect that the
    halftone may be badly broken even when its not 0, but both these files
    are the result of fuzzing, so I doubt its possible to have a real
    working file get to this point.
    
    Guard against the divide-by-zero errors by checking that both the
    parameters are non-zero (its permissible for one to be 0 I believe)

base/gshtscr.c



Ghostscript:

new cppcheck warnings (Cppcheck 1.72): 

base/gshtscr.c:376: error: Shifting a negative value is undefined behaviour
base/gshtscr.c:381: error: Shifting a negative value is undefined behaviour

http://miles.ghostscript.com:8080/artifex/e1aead165e05e98ae765d6569f39ced839d4298e/gs-cppcheck.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.