mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-30 03:47:05 -05:00
Use a more explicit check on readlink result
This should help the static analyzer to understand the code.
This commit is contained in:
parent
ee10b6f9a6
commit
976338f84c
2 changed files with 2 additions and 2 deletions
|
|
@ -247,7 +247,7 @@ static void read_dir(tommy_hashdyn* poolset, const char* base_dir, const char* s
|
|||
int ret;
|
||||
|
||||
ret = readlink(path_next, linkto, sizeof(linkto));
|
||||
if (ret < 0 || ret == sizeof(linkto)) {
|
||||
if (ret < 0 || ret >= PATH_MAX) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Error in readlink symlink '%s'. %s.\n", path_next, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue