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 669909 - [PATCH] Check that convert_text() succeeded
[PATCH] Check that convert_text() succeeded
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-11 21:57 UTC by Daniel Trebbien
Modified: 2012-02-12 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1.27 KB, patch)
2012-02-11 21:59 UTC, Daniel Trebbien
none Details | Review
Fix (1.31 KB, patch)
2012-02-11 22:04 UTC, Daniel Trebbien
none Details | Review

Description Daniel Trebbien 2012-02-11 21:57:58 UTC
validate_and_insert() does not allow its `buffer` parameter to be NULL. If convert_text() fails, then `outbuf` will be NULL and validate_and_insert() will be called with a NULL `buffer`.
Comment 1 Daniel Trebbien 2012-02-11 21:59:03 UTC
Created attachment 207365 [details] [review]
Fix
Comment 2 Daniel Trebbien 2012-02-11 22:04:17 UTC
Created attachment 207366 [details] [review]
Fix

Oops. Should also return FALSE if convert_text() failed.
Comment 3 Paolo Borelli 2012-02-12 11:39:54 UTC
Nice catch! I wonder if this could explain some of the occasional crashes related to encode handling...

Applied!