1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 00:23:32 +02:00

Fix a crash when importing mp3s with duplicate tags via libsndfile. This patch is from Erik de Castro Lopo, already upstream. Also made appropriate entry in audacity-patches.txt

This commit is contained in:
mchinen
2012-02-05 09:05:49 +00:00
parent 2b151826ab
commit cf8c3ee799
3 changed files with 64 additions and 3 deletions

View File

@@ -40,11 +40,16 @@ id3_skip (SF_PRIVATE * psf)
offset = (offset << 7) | (buf [8] & 0x7f) ;
offset = (offset << 7) | (buf [9] & 0x7f) ;
psf_binheader_readf (psf, "j", make_size_t (offset)) ;
psf_log_printf (psf, "ID3 length : %d\n--------------------\n", offset) ;
psf->fileoffset = 10 + offset ;
/* Never want to jump backwards in a file. */
if (offset < 0)
return 0 ;
/* Calculate new file offset and position ourselves there. */
psf->fileoffset += offset + 10 ;
psf_binheader_readf (psf, "p", psf->fileoffset) ;
return 1 ;
} ;