[gnome-desktop/gnome-3-24] thumbnail: Fix use of uninitialised value
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop/gnome-3-24] thumbnail: Fix use of uninitialised value
- Date: Mon, 17 Jul 2017 23:28:12 +0000 (UTC)
commit cf1b21309402f7125fb816da10786d866f8bc18e
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jul 13 17:44:30 2017 +0200
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)
https://bugzilla.gnome.org/show_bug.cgi?id=784915
libgnome-desktop/gnome-desktop-thumbnail.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c
index 775c578..328804d 100644
--- a/libgnome-desktop/gnome-desktop-thumbnail.c
+++ b/libgnome-desktop/gnome-desktop-thumbnail.c
@@ -1262,7 +1262,11 @@ save_thumbnail (GdkPixbuf *pixbuf,
static GdkPixbuf *
make_failed_thumbnail (void)
{
- return gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
+ gdk_pixbuf_fill (pixbuf, 0x00000000);
+ return pixbuf;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]