zvbi/05_MAXPATHLEN.patch
Martin Pluskal a44fd73525 - Use patches from debian:
* 00_fix-configure.in.patch
  * 01_Makefile.am.patch
  * 03_fails-to-write.patch
  * 05_MAXPATHLEN.patch
  * 06_sizeof-FTBFS.patch
  * 07_fix-spelling-in-binaries.patch
  * 08_fix-manpage.patch
  * 09_fix-FTBFS-GCC6.patch
- Drop zvbi-automake-1.13.patch

OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/zvbi?expand=0&rev=19
2017-12-06 08:48:56 +00:00

24 lines
919 B
Diff

Description: fix unconditional MAXPATHLEN use. (Closes: #676130)
Author: Christian Marillat <marillat@debian.org>
Last-Update: 2012-06-14
Index: zvbi-0.2.35/src/proxy-msg.c
===================================================================
--- zvbi-0.2.35.orig/src/proxy-msg.c
+++ zvbi-0.2.35/src/proxy-msg.c
@@ -1039,7 +1039,6 @@ int vbi_proxy_msg_accept_connection( int
static char * vbi_proxy_msg_resolve_symlinks( const char * p_dev_name )
{
struct stat stbuf;
- char link_name[MAXPATHLEN + 1];
char * p_path;
char * p_tmp;
char * p_tmp2;
@@ -1054,6 +1053,7 @@ static char * vbi_proxy_msg_resolve_syml
res = lstat(p_path, &stbuf);
if ((res == 0) && S_ISLNK(stbuf.st_mode))
{
+ char link_name[stbuf.st_size + 1];
name_len = readlink(p_path, link_name, sizeof(link_name));
if ((name_len > 0) && (name_len < (int) sizeof(link_name)))
{