Package: gst-plugins-bad0.10
Version: 0.10.22-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Hi,
currently[1] gst-plugins-bad0.10 does not compile on hurd-i386.
The problem is the unconditional usage of the PATH_MAX define in
sys/shm/shmpipe.c, which can be solve easily by restricting the length of
the tmppath buffer to something slightly bigger than the used length.
[1]
https://buildd.debian.org/status/fetch.php?pkg=gst-plugins-bad0.10&arch=hurd-i386&ver=0.10.22-1&stamp=1305304676
Thanks,
--
Pino
--- a/sys/shm/shmpipe.c
+++ b/sys/shm/shmpipe.c
@@ -262,7 +262,7 @@
sp_open_shm (char *path, int id, mode_t perms, size_t size)
{
ShmArea *area = spalloc_new (ShmArea);
- char tmppath[PATH_MAX];
+ char tmppath[32];
int flags;
int prot;
int i = 0;
@@ -285,7 +285,7 @@
area->shm_fd = shm_open (path, flags, perms);
} else {
do {
- snprintf (tmppath, PATH_MAX, "/shmpipe.5%d.%5d", getpid (), i++);
+ snprintf (tmppath, sizeof (tmppath), "/shmpipe.5%d.%5d", getpid (), i++);
area->shm_fd = shm_open (tmppath, flags, perms);
} while (area->shm_fd < 0 && errno == EEXIST);
}