~ubuntu-branches/debian/experimental/libav/experimental

« back to all changes in this revision

Viewing changes to libavformat/apetag.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-08-10 09:45:02 UTC
  • mfrom: (1.3.14)
  • mto: (1.3.16)
  • mto: This revision was merged to the branch mainline in revision 41.
  • Revision ID: package-import@ubuntu.com-20140810094502-mmdupdml8tixclg2
Tags: upstream-11~alpha1
ImportĀ upstreamĀ versionĀ 11~alpha1

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
 */
22
22
 
 
23
#include <inttypes.h>
 
24
 
23
25
#include "libavutil/intreadwrite.h"
24
26
#include "libavutil/dict.h"
25
27
#include "avformat.h"
147
149
    }
148
150
 
149
151
    if (tag_bytes > file_size - APE_TAG_FOOTER_BYTES) {
150
 
        av_log(s, AV_LOG_ERROR, "Invalid tag size %u.\n", tag_bytes);
 
152
        av_log(s, AV_LOG_ERROR, "Invalid tag size %"PRIu32".\n", tag_bytes);
151
153
        return 0;
152
154
    }
153
155
    tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES;
154
156
 
155
157
    fields = avio_rl32(pb);    /* number of fields */
156
158
    if (fields > 65536) {
157
 
        av_log(s, AV_LOG_ERROR, "Too many tag fields (%d)\n", fields);
 
159
        av_log(s, AV_LOG_ERROR, "Too many tag fields (%"PRIu32")\n", fields);
158
160
        return 0;
159
161
    }
160
162