diff options
-rw-r--r-- | main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -15,6 +15,8 @@ static int readlink_realpath(const char *filepath, char *buffer) { if(bytes_written == -1 && errno == EINVAL) { /* Not a symlink */ strncpy(symlinked_path, filepath, sizeof(symlinked_path)); + } else if(bytes_written == -1) { + return 0; } else { symlinked_path[bytes_written] = '\0'; } |