]> git.sesse.net Git - ffmpeg/commit
avcodec/a64multienc: Don't use static buffers, fix potential races
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sat, 3 Apr 2021 11:07:43 +0000 (13:07 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sat, 3 Apr 2021 11:07:43 +0000 (13:07 +0200)
commit0ca09335aa47fee181c36187143403811b5452f6
treecb97c075defc170c8b5a7dbdb42f45d64a6f3d41
parent5c0f6d53da154ef51933eb5820424612aedda50d
avcodec/a64multienc: Don't use static buffers, fix potential races

render_charset() used static buffers that are always completely
initialized before every use, so that it is unnecessary for the
values in these arrays to be kept after leaving the function.
Given that this is not only unnecessary, but harmful due to the
possibility of data races if several instances of a64multi/a64multi5
run simultaneously these buffers have been replaced by ordinary buffers
on the stack (they are small enough for this).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/a64multienc.c