diff options
Diffstat (limited to 'libmpdemux/mf.c')
-rw-r--r-- | libmpdemux/mf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmpdemux/mf.c b/libmpdemux/mf.c index c8d64313b0..3127176f6e 100644 --- a/libmpdemux/mf.c +++ b/libmpdemux/mf.c @@ -23,6 +23,7 @@ #include <unistd.h> #include <fcntl.h> #include <errno.h> +#include <limits.h> #include <sys/types.h> #include <sys/stat.h> @@ -62,8 +63,8 @@ mf_t* open_mf(char * filename){ FILE *lst_f=fopen(filename + 1,"r"); if ( lst_f ) { - fname=malloc( 255 ); - while ( fgets( fname,255,lst_f ) ) + fname=malloc(PATH_MAX); + while ( fgets( fname,PATH_MAX,lst_f ) ) { /* remove spaces from end of fname */ char *t=fname + strlen( fname ) - 1; |