# HG changeset patch # User bertrand # Date 1007709425 0 # Node ID eb1c24557dad4a2955bfab38efe9501a080cb7dd # Parent a0000475449261f5927a5b2a043d203c7f6ec024 Checked the return values on read. diff -r a00004754492 -r eb1c24557dad libmpdemux/network.c --- a/libmpdemux/network.c Fri Dec 07 05:55:04 2001 +0000 +++ b/libmpdemux/network.c Fri Dec 07 07:17:05 2001 +0000 @@ -187,6 +187,13 @@ i = read( fd, response, BUFFER_SIZE ); if( i<0 ) { printf("Read failed\n"); + http_free( http_hdr ); + return NULL; + } + if( i==0 ) { + printf("http_read_response read 0 -ie- EOF\n"); + http_free( http_hdr ); + return NULL; } http_response_append( http_hdr, response, i ); } while( !http_is_header_entire( http_hdr ) ); @@ -353,7 +360,12 @@ } if( len