-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/libudev/conf-files.c: fix bug of using basename
BASENAME(3) Linux Programmer's Manual say: > These functions may return pointers to statically allocated memory > which may be overwritten by subsequent calls. Using basename return value as key of hashmap is not safe, it may cause that hashmap_put always return -EEXIST if hash collision happen. Using basename return value as strcmp first and second parameters may always return 0. Signed-off-by: xiaofan <xiaofan@iscas.ac.cn>
- Loading branch information
Showing
3 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters