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 #include #include +#include #include #include @@ -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;