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 613658 - null string checking in RBSource_do_impl_search python binding
null string checking in RBSource_do_impl_search python binding
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
unspecified
Other Linux
: Normal trivial
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 596928 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-23 02:16 UTC by max ulidtko
Modified: 2010-03-27 04:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
added manual override with null string checking (3.06 KB, patch)
2010-03-25 15:24 UTC, max ulidtko
committed Details | Review

Description max ulidtko 2010-03-23 02:16:40 UTC
I'm writing a python plugin providing custom BrowserSource. When I define do_impl_search method like below, Rhythmbox crashes on activating that source:

>    def do_impl_search(self, rbsourcesearch, curtext, newtext):
>        pass

Here are few first lines of backtrace, from which it is clearly seen that unchecked null string is passed to PyString_FromString():

  • #0 strlen
    from /lib/tls/i686/cmov/libc.so.6
  • #1 PyString_FromString
    from /usr/lib/libpython2.6.so.1.0
  • #2 _wrap_RBSource__proxy_do_impl_search
    at rb.c line 3294
  • #3 rb_source_search
    at rb-source.c line 953

Comment 1 Alexey Grunichev 2010-03-25 09:29:52 UTC
I have the same problem, as soon as do_impl_search method is added, application crashes with Segmentation fault.
Comment 2 max ulidtko 2010-03-25 15:24:22 UTC
Created attachment 157074 [details] [review]
added manual override with null string checking

I've fixed the bug, here is the patch.
Comment 3 Jonathan Matthew 2010-03-26 10:14:05 UTC
*** Bug 596928 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Matthew 2010-03-27 03:28:30 UTC
Bug 589253 has a patch for pygobject that would allow us to fix this properly.
Comment 5 Jonathan Matthew 2010-03-27 04:05:59 UTC
Pushed as commit 7bf70b5.  Some day when the pygobject bug is fixed, we can remove this.