| 119 | } |
| 120 | |
| 121 | unsigned char *cif_string(cif_context *c, const unsigned char *source, size_t length) { |
| 122 | if (length == SIZE_MAX) { |
| 123 | cif_fail(c, CBM_INVENTORY_LIMIT); |
| 124 | return NULL; |
| 125 | } |
| 126 | unsigned char *result = cif_alloc(c, length + 1, 1); |
| 127 | return result && cif_copy(c, result, source, length) ? result : NULL; |
| 128 | } |
| 129 | |
| 130 | bool cif_compare(cif_context *c, cbm_inventory_path_t a, cbm_inventory_path_t b, int *result) { |
| 131 | if (!cif_event(c)) { |