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 665261 - browser-plugin: Make sure to use the UTF8Length parameter
browser-plugin: Make sure to use the UTF8Length parameter
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-12-01 03:29 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-12-08 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
browser-plugin: Make sure to use the UTF8Length parameter (3.50 KB, patch)
2011-12-01 03:29 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
browser-plugin: Fix memory leak when passing an invalid UUID (1.92 KB, patch)
2011-12-06 20:25 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-12-01 03:29:27 UTC
WebKit-based browsers like Chromium seem to need this, otherwise at random
times the plugin will fail to do a task.
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-12-01 03:29:29 UTC
Created attachment 202496 [details] [review]
browser-plugin: Make sure to use the UTF8Length parameter

Some plugin hosts may have junk after the UTF8Characters that we need to strip
off. WebKit-based browsers like Chromium seem to need this.
Comment 2 drago01 2011-12-04 14:12:51 UTC
Review of attachment 202496 [details] [review]:

To me that sounds like a browser bug but OTOH the fix looks reasonable.
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-12-04 15:32:08 UTC
Pushed. (git bz didn't work)
Comment 4 Christian Persch 2011-12-06 19:56:50 UTC
+  gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
   if (!uuid_is_valid (uuid_str))
     return FALSE;
 
You're leaking the string when taking the FALSE return.
Comment 5 Jasper St. Pierre (not reading bugmail) 2011-12-06 20:25:55 UTC
Created attachment 202941 [details] [review]
browser-plugin: Fix memory leak when passing an invalid UUID

Because I'm a moron, apparently.
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-12-08 16:51:14 UTC
Attachment 202941 [details] pushed as 02af8eb - browser-plugin: Fix memory leak when passing an invalid UUID


Pushed after IRC review.