| 377 | ok; |
| 378 | } |
| 379 | static bool pf_config_boundary(cbm_userconfig_t *guard) { |
| 380 | CBMArena arena; |
| 381 | cbm_arena_init(&arena); |
| 382 | char *bytes = cbm_arena_alloc(&arena, 65537); |
| 383 | cbm_userconfig_t *out = NULL; |
| 384 | bool ok = bytes != NULL; |
| 385 | if (bytes) { |
| 386 | memset(bytes, ' ', 65537); |
| 387 | bytes[0] = '{'; |
| 388 | bytes[65535] = '}'; |
| 389 | ok = cbm_userconfig_from_project_bytes(CBM_USERCONFIG_SOURCE_PRESENT, bytes, 65536, &out) == |
| 390 | CBM_USERCONFIG_SNAPSHOT_OK && |
| 391 | pf_snapshot_view(out, CBM_USERCONFIG_SOURCE_PRESENT, bytes, 65536); |
| 392 | cbm_userconfig_free(out); |
| 393 | ok = pf_config_failure(guard, CBM_USERCONFIG_SOURCE_PRESENT, bytes, 65537, |
| 394 | CBM_USERCONFIG_SNAPSHOT_LIMIT) && |
| 395 | ok; |
| 396 | } |
| 397 | cbm_arena_destroy(&arena); |
| 398 | return ok; |
| 399 | } |
| 400 | static bool pf_unconsumed_config_fields(void) { |
| 401 | static const char bytes[] = "{\"future\":1,\"future\":2,\"extra_extensions\":" |
| 402 | "{\".CUST\":\"CpP\",\".other\":\"c\"}}"; |
no test coverage detected