You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
avfilter/unsharp: fix uninitialized pointer read
Fixes CID 1396855
This commit is contained in:
@ -43,7 +43,7 @@ static int compute_mask(int step, uint32_t *mask)
|
|||||||
{
|
{
|
||||||
int i, z, ret = 0;
|
int i, z, ret = 0;
|
||||||
int counter_size = sizeof(uint32_t) * (2 * step + 1);
|
int counter_size = sizeof(uint32_t) * (2 * step + 1);
|
||||||
uint32_t *temp1_counter, *temp2_counter, **counter;
|
uint32_t *temp1_counter, *temp2_counter, **counter = NULL;
|
||||||
temp1_counter = av_mallocz(counter_size);
|
temp1_counter = av_mallocz(counter_size);
|
||||||
if (!temp1_counter) {
|
if (!temp1_counter) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
@ -80,7 +80,7 @@ static int compute_mask(int step, uint32_t *mask)
|
|||||||
end:
|
end:
|
||||||
av_freep(&temp1_counter);
|
av_freep(&temp1_counter);
|
||||||
av_freep(&temp2_counter);
|
av_freep(&temp2_counter);
|
||||||
for (i = 0; i < 2 * step + 1; i++) {
|
for (i = 0; counter && i < 2 * step + 1; i++) {
|
||||||
av_freep(&counter[i]);
|
av_freep(&counter[i]);
|
||||||
}
|
}
|
||||||
av_freep(&counter);
|
av_freep(&counter);
|
||||||
|
Reference in New Issue
Block a user