diff options
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -661,6 +661,10 @@ int validate_headref(const char *path) len = read_in_full(fd, buffer, sizeof(buffer)-1); close(fd); + if (len < 0) + return -1; + buffer[len] = '\0'; + /* * Is it a symbolic ref? */ |