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 394505 - Nonstandard use of realpath causes segfault on NetBSD
Nonstandard use of realpath causes segfault on NetBSD
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
2.16.x
Other NetBSD
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-01-09 04:50 UTC by Magnus Henoch
Modified: 2007-01-09 22:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
totem-dont-use-realpath.patch (4.08 KB, patch)
2007-01-09 11:08 UTC, Bastien Nocera
none Details | Review

Description Magnus Henoch 2007-01-09 04:50:13 UTC
I'm trying to play a DVD with Totem 2.16.4 on NetBSD, but I get a segfault in realpath.  As far as I can see, this comes from totem_disc_resolve_link in src/plparse/totem-disc.c.  The problem is that realpath is called with the second argument being NULL.  This is a glibc extension (for automatic storage allocation), but causes a segfault with the NetBSD libc.
Comment 1 Bastien Nocera 2007-01-09 09:00:02 UTC
Thanks for the report, I'll look into it.
Comment 2 Bastien Nocera 2007-01-09 11:08:59 UTC
Created attachment 79843 [details] [review]
totem-dont-use-realpath.patch

Possible patch
Comment 3 Bastien Nocera 2007-01-09 11:09:53 UTC
Could you please test the attached patch? It's against SVN trunk, but should apply cleanly to the stable version.
Comment 4 Magnus Henoch 2007-01-09 19:56:35 UTC
Yes, with this patch I can play the disc.  Thanks!
Comment 5 Bastien Nocera 2007-01-09 22:52:22 UTC
Hopefully worked well enough :)

2007-01-09  Bastien Nocera  <hadess@hadess.net>

        * src/plparse/totem-disc.c: (canonicalize_filename),
        (totem_resolve_symlink), (cd_cache_get_dev_from_volumes),
        (cd_cache_get_dev_from_drives), (cd_cache_new):
        Don't use realpath(), to avoid crashes on NetBSD
        (Closes: #394505)

Fixed in trunk and gnome-2-16