Created attachment 8252 proposed patch Hi, In the FreeBSD thunar port (which I maintain) I'm including the attached patch. I created it to solve a user bug report you can view here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217946 The second attachment there, shows the crash in strcmp(), further investigation in gdb let me discover NULL was being passed to it sometimes. My patch replaces NULL unsafe strcmp() calls with g_strcmp0() calls which don't crash when being passed NULLs. This actually solved the problem here. I'm sorry I don't have much more evidence, and producing it now would be cumbersome, but I could do that if strictly required and given some time to collect it. Hope this patch can be included. Please note that I'm setting the affected version to 1.6.15 since I tested there, but I see the same code in 1.8.2 so I assume the problem persists there. I'm anyway in the process of setting up an environment to test XFCE 4.13, so I'll know for sure once done.
Thanks for the patch ! It looks good to me ... dont think there is any advantage in using strcmp directly (possibly 3 CPU cycles saved) Will add it to master, 4.12 and 4.14 branch. Who should get the credits for it ? (Whom should I put as author ?) As far as I read the bsd bugreport, so far you did not find out why NULL is passed there in the first place ?
Great! Thanks. I got the patch from bug 12264 comment 77. I should have specified this in my first comment, but I did not have the reference handy. I was unable to actually find out where the nulls were coming from, but that comment has some insight about this that maybe people more familiar with thunar code can make use of.
Roy Richardson referenced this bugreport in commit e52cdf73c437a1f0007632bf6a10c984924204b5 FreeBSD -Thunar crash due to passing null to strcmp() (Bug #15059) https://git.xfce.org/xfce/thunar/commit?id=e52cdf73c437a1f0007632bf6a10c984924204b5
Roy Richardson referenced this bugreport in commit d9521391850478ec569c563f7768b58174aa4f4a FreeBSD -Thunar crash due to passing null to strcmp() (Bug #15059) https://git.xfce.org/xfce/thunar/commit?id=d9521391850478ec569c563f7768b58174aa4f4a
Roy Richardson referenced this bugreport in commit b1b693cf122a1a95c7a2b497ccdef49b6a8bc81a FreeBSD -Thunar crash due to passing null to strcmp() (Bug #15059) https://git.xfce.org/xfce/thunar/commit?id=b1b693cf122a1a95c7a2b497ccdef49b6a8bc81a
Fixed for master, xfce-4.14 and xfce-4.12 branches Soon to be released into thunar 1.8.3 and 1.6.16
Thanks!