| 330 | } |
| 331 | |
| 332 | static bool gd_value(gd_context_t *g, unsigned char tag, const void *data, size_t length) { |
| 333 | uint64_t count = (uint64_t)length; |
| 334 | if ((size_t)count != length) { |
| 335 | return gd_fail(g, CBM_STORE_GRAPH_DIGEST_LIMIT); |
| 336 | } |
| 337 | return gd_u8(g, tag) && gd_u64(g, count) && gd_bytes(g, data, length); |
| 338 | } |
| 339 | |
| 340 | static bool gd_literal(gd_context_t *g, const char *literal) { |
| 341 | return gd_value(g, GD_TEXT, literal, strlen(literal)); |
no test coverage detected