Commit Diff


commit - 46ea77db89a0945a013f032c6c6a94779126412f
commit + 8a4f8535de4903dd333ad924bd7ff874afa741fa
blob - 2bf465ebc8c8f62842d7a3110a14e10d8220936f
blob + 9e4617d2d22bb0cc089b03f64f1d2bca3d19ab51
--- got/got.c
+++ got/got.c
@@ -1658,6 +1658,11 @@ cmd_clone(int argc, char *argv[])
 		goto done;
 	}
 
+	if (pack_hash == NULL) {
+		error = got_error_fmt(GOT_ERR_FETCH_FAILED, "%s",
+		    "server sent an empty pack file");
+		goto done;
+	}
 	error = got_object_id_str(&id_str, pack_hash);
 	if (error)
 		goto done;