GNOME Bugzilla – Bug 727447
SIGSEGV in gvfs-tree
Last modified: 2014-04-02 06:22:22 UTC
Hi. I have a reproducible segfault with gvfs-tree on OpenBSD. (gdb) run Starting program: /usr/local/bin/gvfs-tree Program received signal SIGSEGV, Segmentation fault. 0x000012079622da42 in strlen (str=0x14 <Address 0x14 out of bounds>) at /usr/src/lib/libc/string/strlen.c:43 43 for (s = str; *s; ++s) (gdb) bt
+ Trace 233423
Created attachment 273436 [details] [review] gvfs-tree: End GOptionEntry array with NULL Prevent a segfault (revealed on OpenBSD) by null-terminating the GOptionEntry array.
Does that fix the issue? Interesting that it doesn't seem to segfault on Linux.
Review of attachment 273436 [details] [review]: I was just about to submit this same patch. I should press 'reload' first :) This is obviously correct.
(In reply to comment #2) > Does that fix the issue? Interesting that it doesn't seem to segfault on Linux. Yup this works like a charm :-) No idea why Linux does not segfault in this situation but OpenBSD is really not permissive about that kind of stuff. Thanks!
Pushed to master as 1d944bcd1fcd1e4a8afb26758c98fa3b72786798. Thanks!