After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784915 - thumbnail: Fix use of uninitialised value
thumbnail: Fix use of uninitialised value
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-13 16:03 UTC by Bastien Nocera
Modified: 2017-07-17 23:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thumbnail: Fix use of uninitialised value (2.55 KB, patch)
2017-07-13 16:03 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2017-07-13 16:03:43 UTC
.
Comment 1 Bastien Nocera 2017-07-13 16:03:47 UTC
Created attachment 355530 [details] [review]
thumbnail: Fix use of uninitialised value

The pixbuf to be written as a placeholder thumbnail was never
initialised to be empty, so might contain random data from the stack.
Use gdk_pixbuf_fill() to solve this problem.

Use of uninitialised value of size 8
   at 0x9A8ED44: crc32_little (crc32.c:287)
   by 0x9A8ED44: crc32_z (crc32.c:220)
   by 0x8A617FB: png_calculate_crc (png.c:153)
   by 0x8A7FACF: png_write_complete_chunk (pngwutil.c:187)
   by 0x8A801B1: png_compress_IDAT (pngwutil.c:1047)
   by 0x8A81F8E: png_write_filtered_row (pngwutil.c:2743)
   by 0x8A81F8E: png_write_find_filter (pngwutil.c:2713)
   by 0x8A7CF21: png_write_row (pngwrite.c:888)
   by 0x8A7D20E: png_write_rows (pngwrite.c:582)
   by 0x8263A08: real_save_png (io-png.c:1139)
   by 0x8263B0A: gdk_pixbuf__png_image_save (io-png.c:1166)
   by 0x8250FF8: gdk_pixbuf_real_save (gdk-pixbuf-io.c:2180)
   by 0x8251820: gdk_pixbuf_savev (gdk-pixbuf-io.c:2479)
   by 0x8251534: gdk_pixbuf_save (gdk-pixbuf-io.c:2418)
   by 0x5342324: save_thumbnail (gnome-desktop-thumbnail.c:1224)
   by 0x53424DD: gnome_desktop_thumbnail_factory_create_failed_thumbnail (gnome-desktop-thumbnail.c:1313)
   by 0x4E89B6A: eog_thumbnail_load (eog-thumbnail.c:518)
   by 0x4E6BA39: eog_job_thumbnail_run (eog-jobs.c:1270)
   by 0x4E69796: eog_job_run (eog-jobs.c:271)
   by 0x4E689A2: eog_job_process (eog-job-scheduler.c:153)
   by 0x4E688AA: eog_job_scheduler (eog-job-scheduler.c:128)
   by 0x97E4004: g_thread_proxy (gthread.c:784)
   by 0x9CAA36C: start_thread (in /usr/lib64/libpthread-2.25.so)
   by 0x9FD2E9E: clone (in /usr/lib64/libc-2.25.so)
Uninitialised value was created by a stack allocation
   at 0x8262D5E: real_save_png (io-png.c:871)
Comment 2 Bastien Nocera 2017-07-17 23:27:31 UTC
Attachment 355530 [details] pushed as 911091d - thumbnail: Fix use of uninitialised value