Commit Diff


commit - ebb42948df126b79ef0cff4ffb379c748f166ec0
commit + 3521b46649a4794366372744129e4e9d171d344f
blob - 553e6bf2e7d7eb1a347e0a5a1542621d2124c6bb
blob + 8c7f34dc5546c4b6cd6a552c84a85544a9b2c00a
--- lib/worktree.c
+++ lib/worktree.c
@@ -1268,6 +1268,9 @@ install_symlink(int *is_bad_symlink, struct got_worktr
 	 */
 	do {
 		err = got_object_blob_read_block(&len, blob);
+		if (err)
+			return err;
+
 		if (len + target_len >= sizeof(target_path)) {
 			/* Path too long; install as a regular file. */
 			*is_bad_symlink = 1;