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 331971 - EOG 64-bit pointer truncation in eog-metadata-reader
EOG 64-bit pointer truncation in eog-metadata-reader
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.13.x
Other All
: Normal critical
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-21 02:34 UTC by Pascal Hofstee
Modified: 2006-02-22 20:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fix 64-bit pointer truncation (2.35 KB, patch)
2006-02-21 02:36 UTC, Pascal Hofstee
none Details | Review
a more proper fix that essentially gets rid of all the void* magic and simply utilizes guchar* (2.28 KB, patch)
2006-02-21 03:07 UTC, Pascal Hofstee
none Details | Review

Description Pascal Hofstee 2006-02-21 02:34:47 UTC
Steps to reproduce:
1. open a jpeg-image that contains EXIF-metadata


Stack trace:
  • #0 memcpy
    at /usr/src/lib/libc/amd64/string/bcopy.S line 65
  • #1 eog_metadata_reader_consume
    at eog-metadata-reader.c line 231
  • #2 eog_image_real_load
    at eog-image.c line 793
  • #3 eog_image_load
    at eog-image.c line 945
  • #4 job_prepare_model_do
    at main.c line 399
  • #5 eog_job_call_action
    at eog-job.c line 382
  • #6 thread_start_func
    at eog-job-manager.c line 85
  • #7 g_thread_create_proxy
    at gthread.c line 566
  • #8 thread_start
    at /usr/src/lib/libpthread/thread/thr_create.c line 341
  • #9 makectx_wrapper
    at /usr/src/lib/libc/amd64/gen/makecontext.c line 100
  • #10 ??
  • #11 ??
  • #12 g_static_private_free
    at gthread.c line 549
  • #13 ??
  • #14 ??
  • #15 ??
  • #16 ??


Other information:
This is observed on a FreeBSD/amd64 7.0-CURRENT system
Comment 1 Pascal Hofstee 2006-02-21 02:36:13 UTC
Created attachment 59810 [details] [review]
Fix 64-bit pointer truncation
Comment 2 Alexander Nedotsukov 2006-02-21 02:50:13 UTC
Ups. I just a few minutes late :-) Actually right way will be to cast gpointer to byte pointer (char*) and ommit all those redundant (void*) casts.
See #159863
Comment 3 Pascal Hofstee 2006-02-21 03:07:47 UTC
Created attachment 59815 [details] [review]
a more proper fix that essentially gets rid of all the void* magic and simply utilizes guchar*
Comment 4 Lucas Rocha 2006-02-22 20:59:48 UTC
Applied, thanks Pascal and Alexander!

2006-02-22  Lucas Rocha  <lucasr@gnome.org>

        * libeog/eog-metadata-reader.c: fix 64-bit pointer
        truncation (Fixes #331971). Patch from Pascal Hofstee
        <caelian@gmail.com> and Alexander Nedotsukov
        <bland@freebsd.org>.