Check if a tar block is all zeros (end of archive). */
| 7106 | |
| 7107 | /* Check if a tar block is all zeros (end of archive). */ |
| 7108 | static bool is_tar_end_of_archive(const unsigned char *hdr) { |
| 7109 | for (int i = 0; i < TAR_BLOCK_SIZE; i++) { |
| 7110 | if (hdr[i] != 0) { |
| 7111 | return false; |
| 7112 | } |
| 7113 | } |
| 7114 | return true; |
| 7115 | } |
| 7116 | |
| 7117 | /* Try to extract the target binary from a tar entry. Returns malloc'd data or NULL. */ |
| 7118 | static unsigned char *tar_try_extract_binary(const unsigned char *hdr, char typeflag, |
no outgoing calls
no test coverage detected