GNOME Bugzilla – Bug 740612
Cups secret service auth_info lookup fails to read auth_info saved by system-config-printer
Last modified: 2014-11-26 03:53:21 UTC
Created attachment 291345 [details] [review] Patch to remove the faulty check This is a followup on Bug 674264. In our deployment we've noticed that GTK3 fails to read auth_info saved with system-config-printer. This is due to a bad and overzealous check for an Invalid secret in gtkcupssecretutils to check if a password is zero terminated. I originally added this check to avoid using a binary secret as a string, but this is uneccessary there and might even lead to an out of bounds memory access in case the password is really not zero terminated. The g_strndup below this check ensures that the secret used later is zero terminated. The NULL pointer check there is also actually uneccessary but I still like to keep it to fail as early and clearly as possible. The Password "test" stored by system-config-printer is provided by gnome-keyring with a len of 4 but a strlen on the pointer returns 6 (does not appear to be random so at least it does not crash). Please apply the attached patch.
Created attachment 291346 [details] [review] Patch to remove the faulty check Removed the following comment and clarified the debug output.