commit c3741b5125b549780b75d4614d6dc283e53bd48d from: Stefan Sperling via: Thomas Adam date: Fri Dec 31 12:00:42 2021 UTC fix NULL dereference in 'got clone' if server sends an empty pack file commit - 4c71f93b66de6eee9e07d65a1f6ae8b13dd576b3 commit + c3741b5125b549780b75d4614d6dc283e53bd48d blob - d4eea4c3897dfc8806b4e71643a149af978da470 blob + 093969a412f974c7bc0306e166d6d6d26eb60019 --- 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;