24 lines
919 B
Diff
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)))
|
||
|
{
|