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 665510 - Do not crash when reading a seemingly valid but truncated keyring file
Do not crash when reading a seemingly valid but truncated keyring file
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: keyring files
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
: 665508 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-12-03 17:36 UTC by Steve Frécinaux
Modified: 2011-12-19 08:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not crash when reading a seemingly valid but truncated keyring file (1.35 KB, patch)
2011-12-03 17:36 UTC, Steve Frécinaux
none Details | Review

Description Steve Frécinaux 2011-12-03 17:36:52 UTC
Following the discussion I had on IRC yesterday with stefw, this patch fixes a crash I got because my login.keyring file had been truncated for some reason.
Comment 1 Steve Frécinaux 2011-12-03 17:36:54 UTC
Created attachment 202716 [details] [review]
Do not crash when reading a seemingly valid but truncated keyring file

The binary keyring parsing function used to trust the values written in
the files a little too much. If for some reason the keyring file has
been truncated, then a memcpy() was attempted but failed with a segfault
because the actual file was smaller than its expected size.
Comment 2 Stef Walter 2011-12-19 08:39:24 UTC
Thanks for the patch! Merged this a few days ago, and forgot to close the bug.
Comment 3 Stef Walter 2011-12-19 08:40:07 UTC
*** Bug 665508 has been marked as a duplicate of this bug. ***