mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
libavutil/base64: Try not to write over the array end
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d216566f2
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ed6b5d6164
commit
f7fcdeb6a0
@ -127,10 +127,12 @@ validity_check:
|
||||
}
|
||||
|
||||
out3:
|
||||
*dst++ = v >> 10;
|
||||
if (end - dst)
|
||||
*dst++ = v >> 10;
|
||||
v <<= 2;
|
||||
out2:
|
||||
*dst++ = v >> 4;
|
||||
if (end - dst)
|
||||
*dst++ = v >> 4;
|
||||
out1:
|
||||
out0:
|
||||
return bits & 1 ? AVERROR_INVALIDDATA : out ? dst - out : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user