# HG changeset patch # User Ralf Ertzinger # Date 1184337294 -7200 # Node ID 690659633ec517415becb092844bc5fa328e6fdd # Parent 486bbb62c3c11934de1e4223645338714d41e5f3 - Fix endless looping on certain unparseable streams diff -r 486bbb62c3c1 -r 690659633ec5 src/flacng/seekable_stream_callbacks.c --- a/src/flacng/seekable_stream_callbacks.c Fri Jul 13 14:36:28 2007 +0200 +++ b/src/flacng/seekable_stream_callbacks.c Fri Jul 13 16:34:54 2007 +0200 @@ -138,6 +138,16 @@ info = (callback_info*) client_data; _DEBUG("Using callback_info %s", info->name); + /* + * If we are testing a stream and use restricted reading, + * return EOF if we have exhausted our alotted reading + * quota + */ + if (0 == info->read_max) { + _DEBUG("read_max exhausted, faking EOF"); + return TRUE; + } + eof = vfs_feof(info->input_stream); _LEAVE eof;