Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib:vector:vlib: Fix possible null pointer dereference
In the function `Vect_cat_list_to_array`, as part of the execution, if list turns out to not contain any numbers, `cats` internal variable is not changed from NULL. Without checking if `cats` is NULL or not, qsort or first elemnt of it is accessed, which can lead to null pointer dereference. To fix that issue, only access cats if it's not NULL. This issue was found using cppcheck tool. Signed-off-by: Mohan Yelugoti <[email protected]>
- Loading branch information