Check if a tar block is all zeros (end of archive). */
| 6098 | |
| 6099 | /* Check if a tar block is all zeros (end of archive). */ |
| 6100 | static bool is_tar_end_of_archive(const unsigned char *hdr) { |
| 6101 | for (int i = 0; i < TAR_BLOCK_SIZE; i++) { |
| 6102 | if (hdr[i] != 0) { |
| 6103 | return false; |
| 6104 | } |
| 6105 | } |
| 6106 | return true; |
| 6107 | } |
| 6108 | |
| 6109 | /* Try to extract the target binary from a tar entry. Returns malloc'd data or NULL. */ |
| 6110 | static unsigned char *tar_try_extract_binary(const unsigned char *hdr, char typeflag, |
no outgoing calls
no test coverage detected