| 50 | } |
| 51 | |
| 52 | static void security_normalize_crlf(char *content) { |
| 53 | if (!content) { |
| 54 | return; |
| 55 | } |
| 56 | char *read_cursor = content; |
| 57 | char *write_cursor = content; |
| 58 | while (*read_cursor) { |
| 59 | if (read_cursor[0] == '\r' && read_cursor[1] == '\n') { |
| 60 | read_cursor++; |
| 61 | } |
| 62 | *write_cursor++ = *read_cursor++; |
| 63 | } |
| 64 | *write_cursor = '\0'; |
| 65 | } |
| 66 | |
| 67 | TEST(vendored_integrity_manifest_is_relocatable_and_fail_closed) { |
| 68 | FILE *checksums = fopen("scripts/vendored-checksums.txt", "r"); |