| 98 | } |
| 99 | |
| 100 | int is_valid_tar_header(const struct tar_posix_header *h) |
| 101 | { |
| 102 | /* Do not remove this check. */ |
| 103 | if(memcmp(&h->magic, tar_header_gnu, sizeof(tar_header_gnu)) != 0 && memcmp(&h->magic, tar_header_posix, sizeof(tar_header_posix)) != 0) |
| 104 | return 0; |
| 105 | if(is_valid_checksum_format(h) == 0) |
| 106 | return 0; |
| 107 | return 1; |
| 108 | } |
| 109 | |
| 110 | /*@ |
| 111 | @ requires buffer_size >= sizeof(struct tar_posix_header); |
no test coverage detected