int (*parse)(AVFormatContext *avctx, AVStream *st,
const char *name, int size))
{
- int count, i;
+ unsigned count;
+ int i;
+
AVIOContext *pb = avctx->pb;
avio_skip(pb, 4);
count = avio_rb32(pb);
for (i = 0; i < count; i++) {
char name[17];
int size;
+
+ if (avio_feof(pb))
+ return AVERROR_EOF;
+
avio_read(pb, name, 16);
name[sizeof(name) - 1] = 0;
size = avio_rb32(pb);