[Coverity 1427588] Dereference null return value in linux/dirs.c
If the function actually returns a null value, a null pointer dereference will occur.
In config_GetLibDirRaw: Return value of function which returns null is dereferenced without checking (CWE-476)
10. returned_null: strrchr returns NULL (checked 23 out of 24 times). [Note: The source code implementation of the function has been overridden by a builtin model.]
11. var_assigned: Assigning: file = NULL return value from strrchr.
63 char *file = strrchr (line, '/');
12. Condition end == NULL, taking false branch.
64 if (end == NULL)
65 continue;
CID 1427588: (#1 of 1): Dereference null return value (NULL_RETURNS)
13. dereference: Dereferencing file, which is known to be NULL.
66 *file = '\0';
Should probably have been a test on file
instead of end
in 79399150.
Edited by Steve Lhomme