mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
avcodec/avcodec: fix UB NULL+0
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
ad417eb5fa
commit
36a56d3cc8
@ -44,10 +44,11 @@
|
||||
|
||||
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
int r = func(c, (char *)arg + i * size);
|
||||
size_t offset = i * size;
|
||||
int r = func(c, FF_PTR_ADD((char *)arg, offset));
|
||||
if (ret)
|
||||
ret[i] = r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user