mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/ : Exit parser loop when marker == 0.
This commit is contained in:
parent
f07fb6e0f6
commit
028458b9f6
@ -4,6 +4,9 @@
|
||||
Fix regression in handling of odd length SSND chunks.
|
||||
Thanks Olivier Tristan for the example file.
|
||||
|
||||
* src/aiff.c src/wav.c
|
||||
Exit parser loop when marker == 0.
|
||||
|
||||
2012-04-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/FAQ.html
|
||||
|
@ -416,6 +416,10 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
|
||||
|
||||
marker = chunk_size = 0 ;
|
||||
psf_binheader_readf (psf, "Ejm4", jump, &marker, &chunk_size) ;
|
||||
if (marker == 0)
|
||||
{ psf_log_printf (psf, "Have 0 marker.\n") ;
|
||||
break ;
|
||||
} ;
|
||||
|
||||
if (psf->file.mode == SFM_RDWR && (found_chunk & HAVE_SSND))
|
||||
return SFE_AIFF_RW_SSND_NOT_LAST ;
|
||||
|
@ -349,6 +349,10 @@ wav_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
|
||||
|
||||
marker = chunk_size = 0 ;
|
||||
psf_binheader_readf (psf, "jm4", jump, &marker, &chunk_size) ;
|
||||
if (marker == 0)
|
||||
{ psf_log_printf (psf, "Have 0 marker.\n") ;
|
||||
break ;
|
||||
} ;
|
||||
|
||||
psf_store_read_chunk_u32 (&psf->rchunks, marker, psf_ftell (psf), chunk_size) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user