{"action":"created","issue":{"url":"https://api.github.com/repos/mate-desktop/eom/issues/93","labels_url":"https://api.github.com/repos/mate-desktop/eom/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/mate-desktop/eom/issues/93/comments","events_url":"https://api.github.com/repos/mate-desktop/eom/issues/93/events","html_url":"https://github.com/mate-desktop/eom/issues/93","id":97356158,"number":93,"title":"EOM crashes when trying to open a large PNG file","user":{"login":"vigri","id":2580723,"avatar_url":"https://avatars.githubusercontent.com/u/2580723?v=3","gravatar_id":"","url":"https://api.github.com/users/vigri","html_url":"https://github.com/vigri","followers_url":"https://api.github.com/users/vigri/followers","following_url":"https://api.github.com/users/vigri/following{/other_user}","gists_url":"https://api.github.com/users/vigri/gists{/gist_id}","starred_url":"https://api.github.com/users/vigri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigri/subscriptions","organizations_url":"https://api.github.com/users/vigri/orgs","repos_url":"https://api.github.com/users/vigri/repos","events_url":"https://api.github.com/users/vigri/events{/privacy}","received_events_url":"https://api.github.com/users/vigri/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mate-desktop/eom/labels/confirmed%20bug","name":"confirmed bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-26T22:46:13Z","updated_at":"2015-09-17T11:31:03Z","closed_at":null,"body":"Hello,\r\n\r\nI would like to report a bug concerning EOM version 1.8.0\r\n\r\nWhen trying to open a large PNG file 27.000px x 27.000px) EOM crashes.\r\n\r\nEnvironment:\r\nDebian 8.1 x64\r\nEOM 1.8.0\r\n\r\nI've been able to catch a backtrace using gdb:\r\n\r\n```\r\nProgram received signal SIGSEGV, Segmentation fault.                                                                                                                                                               \r\n[Switching to Thread 0x7fd046086700 (LWP 57178)]                                                                                                                                                       >0x00007fd04fc042f0 in mate_desktop_thumbnail_scale_down_pixbuf () from /usr/lib/x86_64-linux-gnu/libmate-desktop-2.so.17                                                                                           \r\n(gdb) bt\r\n#0  0x00007fd04fc042f0 in mate_desktop_thumbnail_scale_down_pixbuf () from /usr/lib/x86_64-linux-gnu/libmate-desktop-2.so.17\r\n#1  0x0000000000440375 in eom_thumbnail_load ()\r\n#2  0x0000000000441481 in ?? ()\r\n#3  0x00000000004405b1 in ?? ()\r\n#4  0x00007fd04ca51935 in g_thread_proxy (data=0xbf2850) at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c:764\r\n#5  0x00007fd04b69a0a4 in start_thread (arg=0x7fd046086700) at pthread_create.c:309\r\n#6  0x00007fd04b3cf04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111\r\n```\r\n\r\nPlease let me know if you need the test file.\r\n\r\nBest regards"},"comment":{"url":"https://api.github.com/repos/mate-desktop/eom/issues/comments/141049586","html_url":"https://github.com/mate-desktop/eom/issues/93#issuecomment-141049586","issue_url":"https://api.github.com/repos/mate-desktop/eom/issues/93","id":141049586,"user":{"login":"monsta","id":5138986,"avatar_url":"https://avatars.githubusercontent.com/u/5138986?v=3","gravatar_id":"","url":"https://api.github.com/users/monsta","html_url":"https://github.com/monsta","followers_url":"https://api.github.com/users/monsta/followers","following_url":"https://api.github.com/users/monsta/following{/other_user}","gists_url":"https://api.github.com/users/monsta/gists{/gist_id}","starred_url":"https://api.github.com/users/monsta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monsta/subscriptions","organizations_url":"https://api.github.com/users/monsta/orgs","repos_url":"https://api.github.com/users/monsta/repos","events_url":"https://api.github.com/users/monsta/events{/privacy}","received_events_url":"https://api.github.com/users/monsta/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T11:31:03Z","updated_at":"2015-09-17T11:31:03Z","body":"I really don't get it... the crash happens [here](https://git.gnome.org/browse/gtk+/tree/gdk/gdkcairo.c?h=gtk-2-24#n214), during ```g_malloc``` call:\r\n\r\n```\r\n  cairo_stride = cairo_format_stride_for_width (format, width);\r\n  cairo_pixels = g_malloc (height * cairo_stride);\r\n```\r\nThe backtrace shows us the values:\r\n```\r\n        width = 27000\r\n        height = 27000\r\n        cairo_stride = 108000\r\n```\r\nThen ```g_malloc``` should try to allocate ```27000 x 108000 = 2916000000``` bytes. Why does it try to allocate ```18446744072330584320``` bytes instead? :confused: "}}