Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes: > @@ -2537,20 +2536,17 @@ int index_path(unsigned char *sha1, const char *path, struct stat *st, int write > path); > break; > case S_IFLNK: > - len = xsize_t(st->st_size); > - target = xmalloc(len + 1); > - if (readlink(path, target, len + 1) != st->st_size) { > + if (strbuf_readlink(&sb, path, st->st_size)) { > char *errstr = strerror(errno); > - free(target); > return error("readlink(\"%s\"): %s", path, > errstr); Thanks; as strbuf_readlink() does not do any iffy library calls that would stomp on errno, the error reporting should still be valid here. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html