mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-27 03:50:29 +00:00
Do not exit parsers when log buffer overflows. Remove SFE_LOG_OVERRUN.
This commit is contained in:
parent
d0a2485074
commit
2cde67564c
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2005-01-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/aiff.c src/w64.c src/wav.c
|
||||
Do not return a header parse error when the log buffer overflows.
|
||||
Continuing parsing works even on files where the log buffer does overflow.
|
||||
This avoids a bug on some weirdo WAV (and other) files.
|
||||
|
||||
* src/common.h src/sndfile.c
|
||||
Remove SFE_LOG_OVERRIN error and its associated error message.
|
||||
|
||||
2004-12-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile-play.c
|
||||
|
@ -705,9 +705,6 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
|
||||
|
||||
if (psf_ftell (psf) >= psf->filelength - (2 * SIGNED_SIZEOF (dword)))
|
||||
break ;
|
||||
|
||||
if (psf->logindex >= SIGNED_SIZEOF (psf->logbuffer) - 2)
|
||||
return SFE_LOG_OVERRUN ;
|
||||
} ; /* while (1) */
|
||||
|
||||
if (! (found_chunk & HAVE_FORM))
|
||||
|
@ -326,7 +326,6 @@ enum
|
||||
SFE_NO_PIPE_WRITE,
|
||||
|
||||
SFE_INTERNAL,
|
||||
SFE_LOG_OVERRUN,
|
||||
SFE_BAD_CONTROL_CMD,
|
||||
SFE_BAD_ENDIAN,
|
||||
SFE_CHANNEL_COUNT,
|
||||
|
@ -72,7 +72,6 @@ ErrorStruct SndfileErrors [] =
|
||||
{ SFE_INTERLEAVE_READ , "Bad karma in read during interleave read operation." },
|
||||
|
||||
{ SFE_INTERNAL , "Unspecified internal error." },
|
||||
{ SFE_LOG_OVERRUN , "Log buffer has overrun. File probably broken." },
|
||||
{ SFE_BAD_CONTROL_CMD , "Bad command passed to function sf_command()." },
|
||||
{ SFE_BAD_ENDIAN , "Bad endian-ness. Try default endian-ness" },
|
||||
{ SFE_CHANNEL_COUNT , "Too many channels specified." },
|
||||
|
@ -304,9 +304,6 @@ w64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
|
||||
|
||||
if (psf_ftell (psf) >= (psf->filelength - (2 * SIGNED_SIZEOF (dword))))
|
||||
break ;
|
||||
|
||||
if (psf->logindex >= SIGNED_SIZEOF (psf->logbuffer) - 2)
|
||||
return SFE_LOG_OVERRUN ;
|
||||
} ; /* while (1) */
|
||||
|
||||
if (! psf->dataoffset)
|
||||
|
@ -525,9 +525,6 @@ wav_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
|
||||
{ psf_log_printf (psf, "End\n") ;
|
||||
break ;
|
||||
} ;
|
||||
|
||||
if (psf->logindex >= SIGNED_SIZEOF (psf->logbuffer) - 2)
|
||||
return SFE_LOG_OVERRUN ;
|
||||
} ; /* while (1) */
|
||||
|
||||
if (! psf->dataoffset)
|
||||
@ -1197,9 +1194,6 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk)
|
||||
psf_store_string (psf, SF_STR_DATE, psf->u.cbuf) ;
|
||||
break ;
|
||||
} ;
|
||||
|
||||
if (psf->logindex >= SIGNED_SIZEOF (psf->logbuffer) - 2)
|
||||
return SFE_LOG_OVERRUN ;
|
||||
} ;
|
||||
|
||||
current_pos = psf_fseek (psf, 0, SEEK_CUR) - current_pos ;
|
||||
|
Loading…
Reference in New Issue
Block a user