DamoSWL / 8000_Shell

project 1 written in C/C++ in 8000
Apache License 2.0
0 stars 0 forks source link

Potential leak of memory pointed to by "newCmd" #65

Closed Chinmaykd21 closed 3 years ago

Chinmaykd21 commented 3 years ago

Project: Shell Report by: Chinmay Kulkarni, Team Blue

Vulnerability Type: Memory Leak (Potential leak of memory pointed to by "newCmd") Exploitability: Yes.

Analysis method used: Scan-build

image

Vulnerability Description: Warning of potential memory leak is caused by not de-allocating memory assigned to the newCmd char pointer(Error Location is shown in the screenshot above). Not doing the deallocation can lead to memory issues which will lead to program crashes at some later stages.

Possible Solution:

When the memory allocated to newCmd char pointer is de-allocated the warning of potential memory leak got solved.

Screenshot 2021-03-31 160302

mustakimur commented 3 years ago

@DamoSWL @QuuikSilva98 @shawnwork please, review the issue and confirm/patch if required.

mustakimur commented 3 years ago

@DamoSWL you have to explain before you close an issue. This was very rude.

DamoSWL commented 3 years ago

this has been solved