| 839 | } |
| 840 | |
| 841 | static bool cv2_image(cv2_context_t *ctx, cv2_span_t span) { |
| 842 | if (span.length != 64) |
| 843 | return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT); |
| 844 | for (size_t i = 0; i < span.length; i++) { |
| 845 | if (!cv2_step(ctx)) |
| 846 | return false; |
| 847 | if (cv2_hex_digit(span.data[i]) < 0) |
| 848 | return cv2_fail(ctx, CBM_COVERAGE_PARSE_FORMAT); |
| 849 | ctx->binding.image_sha256[i] = (char)span.data[i]; |
| 850 | } |
| 851 | ctx->binding.image_sha256[64] = '\0'; |
| 852 | return true; |
| 853 | } |
| 854 | |
| 855 | static bool cv2_header(cv2_context_t *ctx, cv2_span_t profiles) { |
| 856 | cv2_span_t fields[4]; |
no test coverage detected