Open ellena13 opened 1 year ago
p->make_model
strdup
https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7155-L7159
p->pdl
https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7160-L7164
p->ip
https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7183
and lost at cups-browsed.c:7209:
https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7207-L7210
Other dynamic memory allocations in this function are protected from MEMORY_LEAK by calling goto fail. But there are no such checks for these 3 cases.
goto fail
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author E. Bykhanova.
Please run your scanner on the latest cups-filters version - 2.0.0, thank you!
p->make_model
, is allocated by calling functionstrdup
:https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7155-L7159
p->pdl
, is allocated by calling functionstrdup
:https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7160-L7164
p->ip
, is allocated by calling functionstrdup
:https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7183
and lost at cups-browsed.c:7209:
https://github.com/OpenPrinting/cups-filters/blob/8ac453d0c22a87984127f4c89bd5747d1409db23/utils/cups-browsed.c#L7207-L7210
Other dynamic memory allocations in this function are protected from MEMORY_LEAK by calling
goto fail
. But there are no such checks for these 3 cases.Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author E. Bykhanova.