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:2409–2416  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2407
2408/* Check if a tar block is all zeros (end of archive). */
2409static bool is_tar_end_of_archive(const unsigned char *hdr) {
2410 for (int i = 0; i < TAR_BLOCK_SIZE; i++) {
2411 if (hdr[i] != 0) {
2412 return false;
2413 }
2414 }
2415 return true;
2416}
2417
2418/* Try to extract the target binary from a tar entry. Returns malloc'd data or NULL. */
2419static unsigned char *tar_try_extract_binary(const unsigned char *hdr, char typeflag,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected