Check if a tar block is all zeros (end of archive). */
| 6318 | |
| 6319 | /* Check if a tar block is all zeros (end of archive). */ |
| 6320 | static 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. */ |
| 6330 | static unsigned char *tar_try_extract_binary(const unsigned char *hdr, char typeflag, |
no outgoing calls
no test coverage detected