Fixes integer & buffer overflow
Showing the changes to libswresample (1 of 1 file). Show all
Unified · Split
| @@ -235,7 +235,7 @@ static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_r · 234 unmodified lines | ||
| 235 | 235 | c->factor = factor; |
| 236 | 236 | c->filter_length = FFMAX((int)ceil(filter_size/factor), 1); |
| 237 | 237 | c->filter_alloc = FFALIGN(c->filter_length, 8); |
| 238 | − c->filter_bank = av_mallocz(c->filter_alloc*(phase_count+1)*c->felem_size); | |
| 238 | + c->filter_bank = av_calloc(c->filter_alloc, (phase_count+1)*c->felem_size); | |
| 239 | 239 | c->filter_type = filter_type; |
| 240 | 240 | c->kaiser_beta = kaiser_beta; |
| 241 | 241 | if (!c->filter_bank) |