mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02: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