]> git.ipfire.org Git - thirdparty/cups.git/commit
Add additional parameter validation to _cupsRasterWritePixels 914/head
authorBenjamin Gordon <bmgordon@chromium.org>
Mon, 25 Mar 2024 15:59:21 +0000 (09:59 -0600)
committerBenjamin Gordon <bmgordon@chromium.org>
Mon, 25 Mar 2024 16:23:04 +0000 (10:23 -0600)
commitc8c5577ded0f207822d4e4b1f3a1923701f76592
treecb1f6fadc33399fd98d7efa39dd51969f524b588
parent1aa0b7bd7782f0d08e79189e8df36541444bac45
Add additional parameter validation to _cupsRasterWritePixels

If len is 0, the function does a lot of calculations that ultimately
don't produce any output.  This can be skipped with an early return.

If cupsBytesPerLine is 0, this triggers a divide by zero if the output
isn't compressed.  This is an error on the caller's part, but it's
nicer to return an error than to crash.
cups/raster-stream.c