[flac-dev] [PATCH] update obj->num_comments if short circuit in read_metadata_vorbiscomment_
Robert Shih
robertshih at google.com
Mon Mar 14 12:34:49 PDT 2016
In function read_metadata_vorbiscomment_ from stream_decoder.c, at
various locations where we short circuit the computation, we also set
`obj->num_comments` accordingly. For example:
https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1736
https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1741
https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1752
https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1758
https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1763
https://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_decoder.c;h=e0f1b14d30dd548268a88e4341af3f38290816e3;hb=HEAD#l1774
Would it be appropriate to do the same thing should safe_malloc_add_2op_ fail?
Attached patch to illustrate what I mean.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: num_comments.patch
Type: application/octet-stream
Size: 625 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20160314/f3f8d848/attachment.obj
More information about the flac-dev
mailing list