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 737777 - Applications crash randomly while printing with a password-secured SMB printer
Applications crash randomly while printing with a password-secured SMB printer
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.24.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-10-02 12:07 UTC by Dariusz Gadomski
Modified: 2014-10-07 22:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for the master branch. (1019 bytes, patch)
2014-10-02 12:13 UTC, Dariusz Gadomski
none Details | Review
Fix for the master branch. (1.04 KB, patch)
2014-10-02 12:14 UTC, Dariusz Gadomski
committed Details | Review

Description Dariusz Gadomski 2014-10-02 12:07:49 UTC
I have encountered a strange crash during backporting of https://git.gnome.org/browse/gtk+/commit/?id=382d68ff8e5701a10aa8d4f879c46c63c21e075f

According to my analysis the problem was that auth_info array was not null-terminated causing crash in g_strdupv call (modules/printbackends/cups/gtkcupssecretsutils.c:1035).

This array should size should be allocated bigger by 1 and NULL-terminated.

Will attach patch shortly.
Comment 1 Dariusz Gadomski 2014-10-02 12:09:57 UTC
The crash consistently happens with firefox on Ubuntu amd64 14.04 using gtk with the mentioned fix backported from my ppa: ppa:dgadomski/gtk.

On other gtk2 applications (I have tested dia and medit) it did not crash, probably by accident. Firefox must be causing a different memory layout making this crash to occur.
Comment 2 Dariusz Gadomski 2014-10-02 12:13:18 UTC
Created attachment 287576 [details] [review]
Fix for the master branch.
Comment 3 Dariusz Gadomski 2014-10-02 12:14:41 UTC
Created attachment 287577 [details] [review]
Fix for the master branch.

I have added a link to this back in the patch description.