History

fix possible null pointer deref in lsx_make_lpf() (CVE-2019-8357)

If the buffer allocation fails, return NULL.

Mans Rullgard committed 7 years ago

Commit 2ce02fe1 parent b7883ae1 file · +3 −0Browse files

Unified · Split

src/effects_i_dsp.c+3−0
@@ -362,6 +362,9 @@ double * lsx_make_lpf(int num_taps, double Fc, double beta, double rho, · 361 unmodified lines
362362 assert(Fc >= 0 && Fc <= 1);
363363 lsx_debug("make_lpf(n=%i Fc=%.7g β=%g ρ=%g dc-norm=%i scale=%g)", num_taps, Fc, beta, rho, dc_norm, scale);
364364
365+ if (!h)
366+ return NULL;
367+
365368 for (i = 0; i <= m / 2; ++i) {
366369 double z = i - .5 * m, x = z * M_PI, y = z * mult1;
367370 h[i] = x? sin(Fc * x) / x : Fc;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t