| 646 | } |
| 647 | |
| 648 | static bool gd_project_argument(gd_context_t *g, const unsigned char *project, size_t length) { |
| 649 | while (length) { |
| 650 | size_t chunk = length > GD_CHUNK_BYTES ? GD_CHUNK_BYTES : length; |
| 651 | if (!gd_check(g)) { |
| 652 | return false; |
| 653 | } |
| 654 | if (memchr(project, 0, chunk)) { |
| 655 | return gd_fail(g, CBM_STORE_GRAPH_DIGEST_INVALID); |
| 656 | } |
| 657 | if (!gd_check(g)) { |
| 658 | return false; |
| 659 | } |
| 660 | project += chunk; |
| 661 | length -= chunk; |
| 662 | } |
| 663 | return true; |
| 664 | } |
| 665 | |
| 666 | cbm_store_graph_digest_status_t cbm_store_graph_digest( |
| 667 | cbm_store_read_scope_t *scope, const unsigned char *project, size_t project_len, |
no test coverage detected