MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / is_tar_end_of_archive

Function is_tar_end_of_archive

src/cli/cli.c:6320–6327  ·  view source on GitHub ↗

Check if a tar block is all zeros (end of archive). */

Source from the content-addressed store, hash-verified

6318
6319/* Check if a tar block is all zeros (end of archive). */
6320static bool is_tar_end_of_archive(const unsigned char *hdr) {
6321 for (int i = 0; i < TAR_BLOCK_SIZE; i++) {
6322 if (hdr[i] != 0) {
6323 return false;
6324 }
6325 }
6326 return true;
6327}
6328
6329/* Try to extract the target binary from a tar entry. Returns malloc'd data or NULL. */
6330static unsigned char *tar_try_extract_binary(const unsigned char *hdr, char typeflag,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected