Hi! 2016-08-17 17:32 GMT+02:00 Michael Niedermayer <mich...@niedermayer.cc>: >> + av_opt_get(s->pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type); >> + if (mime_type && s->iformat->mime_type) { >> + int rate = 0, channels = 0; >> + size_t len = strlen(s->iformat->mime_type); >> + if (!strncmp(s->iformat->mime_type, mime_type, len)) { >> + uint8_t *options = mime_type + len; >> + len = strlen(mime_type); >> + while (options < mime_type + len) { >> + options = strstr(options, ";"); >> + if (!options++) >> + break; >> + if (!rate) >> + sscanf(options, " rate=%d", &rate); >> + if (!channels) >> + sscanf(options, " channels=%d", &channels); >> + } > > rate and channels probably should be subject to some sanity checks > like < 0
Sanity checks for <0 added, INT_MAX is also possible with the current code. Patch applied, Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel