GNOME Bugzilla – Bug 776026
Coverity fixes
Last modified: 2016-12-19 18:03:37 UTC
Various miscellaneous fixes resulting from doing some scanning of gdk-pixbuf with Coverity. Nothing particularly interesting so far; mostly problems in error handling paths.
Created attachment 341852 [details] [review] io-gif: Clarify buffer length management buffer_count is read from the file, and then we potentially copy up to that number of bytes straight into a buffer without a length check. This does not result in buffer overflow iff the buffer is at least 255 bytes long. Make that clear. Coverity CID 609094
Created attachment 341853 [details] [review] thumbnailer: Fix a potential NULL pointer dereference In debug code on an error path: if the loader is not loaded due to mime_type being NULL, no error is set; so dereferencing it is a bad idea. Coverity CID 1388530
Created attachment 341854 [details] [review] io-jpeg: Fix a potential infinite loop when failing to write out If libjpeg fails to write out a scan line, this loop would never have terminated (as next_scanline would never be incremented). Fix that by checking for the return value from jpeg_write_scanlines(). Coverity CID 1388533
Attachment 341852 [details] pushed as 5b15f34 - io-gif: Clarify buffer length management Attachment 341853 [details] pushed as 49dcd2d - thumbnailer: Fix a potential NULL pointer dereference Attachment 341854 [details] pushed as 5916326 - io-jpeg: Fix a potential infinite loop when failing to write out