cups-filters icon indicating copy to clipboard operation
cups-filters copied to clipboard

DIVISION_BY_ZERO in ../cupsfilters/image-zoom.c

Open ellena13 opened this issue 2 years ago • 1 comments

  • Expression z->xsize, used as divisor at

https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/cupsfilters/image-zoom.c#L127-L128

and

https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/cupsfilters/image-zoom.c#L154-L155

may have a zero value when variable xsize has value 0.

Check at image-zoom.c:109 does not prevent this error :

https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/cupsfilters/image-zoom.c#L109-L117

  • Expression z->ysize, used as divisor at

https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/cupsfilters/image-zoom.c#L130-L131

and

https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/cupsfilters/image-zoom.c#L157-L158

may have a zero value when variable ysize has value 0.

Check at image-zoom.c:95 does not prevent this error:

https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/cupsfilters/image-zoom.c#L94-L99

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.

Author E. Bykhanova.

ellena13 avatar Oct 05 '23 07:10 ellena13

Please run your scanner on the latest cups-filters version - 2.0.0, thank you!

zdohnal avatar Oct 12 '23 07:10 zdohnal