| {"target_id": "cups:merged:src/cups/cups/ppd-cache.c:2829", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cups", "harness": "merged", "harness_binaries": "[\"fuzz_array\", \"fuzz_cups\", \"fuzz_http_core\", \"fuzz_ipp\", \"fuzz_ipp_gen\", \"fuzz_ppd_gen_1\", \"fuzz_ppd_gen_cache\", \"fuzz_ppd_gen_conflicts\", \"fuzz_raster\"]", "language": "c", "file": "/src/cups/cups/ppd-cache.c", "line_start": 2829, "line_end": 2829, "line_count": 1, "function": "", "source_snippet": " 2729 | */\n 2730 | \n 2731 | snprintf(pc->custom_ppd_size, sizeof(pc->custom_ppd_size), \"Custom.%dx%d\",\n 2732 | (int)PWG_TO_POINTS(jobsize.width), (int)PWG_TO_POINTS(jobsize.length));\n 2733 | \n 2734 | if (margins_set && exact)\n 2735 | {\n 2736 | dleft = pc->custom_size.left - jobsize.left;\n 2737 | dright = pc->custom_size.right - jobsize.right;\n 2738 | dtop = pc->custom_size.top - jobsize.top;\n 2739 | dbottom = pc->custom_size.bottom - jobsize.bottom;\n 2740 | \n 2741 | if (dleft > -35 && dleft < 35 && dright > -35 && dright < 35 &&\n 2742 | dtop > -35 && dtop < 35 && dbottom > -35 && dbottom < 35)\n 2743 | \t*exact = 1;\n 2744 | }\n 2745 | else if (exact)\n 2746 | *exact = 1;\n 2747 | \n 2748 | DEBUG_printf(\"1_ppdCacheGetPageSize: Returning \\\"%s\\\" (custom)\", pc->custom_ppd_size);\n 2749 | \n 2750 | return (pc->custom_ppd_size);\n 2751 | }\n 2752 | \n 2753 | /*\n 2754 | * No custom page size support or the size is out of range - return NULL.\n 2755 | */\n 2756 | \n 2757 | DEBUG_puts(\"1_ppdCacheGetPageSize: Returning NULL\");\n 2758 | \n 2759 | return (NULL);\n 2760 | }\n 2761 | \n 2762 | \n 2763 | /*\n 2764 | * '_ppdCacheGetSize()' - Get the PWG size associated with a PPD PageSize.\n 2765 | */\n 2766 | \n 2767 | pwg_size_t *\t\t\t\t/* O - PWG size or NULL */\n 2768 | _ppdCacheGetSize(\n 2769 | _ppd_cache_t *pc,\t\t\t/* I - PPD cache and mapping data */\n 2770 | const char *page_size,\t\t/* I - PPD PageSize */\n 2771 | ppd_size_t *ppd_size)\t\t/* I - PPD page size information */\n 2772 | {\n 2773 | int\t\ti;\t\t\t/* Looping var */\n 2774 | pwg_media_t\t*media;\t\t\t/* Media */\n 2775 | pwg_size_t\t*size;\t\t\t/* Current size */\n 2776 | \n 2777 | \n 2778 | /*\n 2779 | * Range check input...\n 2780 | */\n 2781 | \n 2782 | if (!pc || !page_size)\n 2783 | return (NULL);\n 2784 | \n 2785 | if (!_cups_strcasecmp(page_size, \"Custom\") || !_cups_strncasecmp(page_size, \"Custom.\", 7))\n 2786 | {\n 2787 | /*\n 2788 | * Custom size; size name can be one of the following:\n 2789 | *\n 2790 | * Custom.WIDTHxLENGTHin - Size in inches\n 2791 | * Custom.WIDTHxLENGTHft - Size in feet\n 2792 | * Custom.WIDTHxLENGTHcm - Size in centimeters\n 2793 | * Custom.WIDTHxLENGTHmm - Size in millimeters\n 2794 | * Custom.WIDTHxLENGTHm - Size in meters\n 2795 | * Custom.WIDTHxLENGTH[pt] - Size in points\n 2796 | */\n 2797 | \n 2798 | double\t\tw, l;\t\t/* Width and length of page */\n 2799 | char\t\t*ptr;\t\t/* Pointer into PageSize */\n 2800 | struct lconv\t*loc;\t\t/* Locale data */\n 2801 | \n 2802 | if (page_size[6])\n 2803 | {\n 2804 | loc = localeconv();\n 2805 | w = (float)_cupsStrScand(page_size + 7, &ptr, loc);\n 2806 | if (!ptr || *ptr != 'x')\n 2807 | \treturn (NULL);\n 2808 | \n 2809 | l = (float)_cupsStrScand(ptr + 1, &ptr, loc);\n 2810 | if (!ptr)\n 2811 | \treturn (NULL);\n 2812 | \n 2813 | if (!_cups_strcasecmp(ptr, \"in\"))\n 2814 | {\n 2815 | \tw *= 2540.0;\n 2816 | \tl *= 2540.0;\n 2817 | }\n 2818 | else if (!_cups_strcasecmp(ptr, \"ft\"))\n 2819 | {\n 2820 | \tw *= 12.0 * 2540.0;\n 2821 | \tl *= 12.0 * 2540.0;\n 2822 | }\n 2823 | else if (!_cups_strcasecmp(ptr, \"mm\"))\n 2824 | {\n 2825 | \tw *= 100.0;\n 2826 | \tl *= 100.0;\n 2827 | }\n 2828 | else if (!_cups_strcasecmp(ptr, \"cm\"))\n> 2829 | {\n 2830 | \tw *= 1000.0;\n 2831 | \tl *= 1000.0;\n 2832 | }\n 2833 | else if (!_cups_strcasecmp(ptr, \"m\"))\n 2834 | {\n 2835 | \tw *= 100000.0;\n 2836 | \tl *= 100000.0;\n 2837 | }\n 2838 | else\n 2839 | {\n 2840 | \tw *= 2540.0 / 72.0;\n 2841 | \tl *= 2540.0 / 72.0;\n 2842 | }\n 2843 | }\n 2844 | else if (ppd_size)\n 2845 | {\n 2846 | w = ppd_size->width * 2540.0 / 72.0;\n 2847 | l = ppd_size->length * 2540.0 / 72.0;\n 2848 | }\n 2849 | else\n 2850 | {\n 2851 | // No custom size information...\n 2852 | return (NULL);\n 2853 | }\n 2854 | \n 2855 | pwgFormatSizeName(pc->custom_pwg_size, sizeof(pc->custom_pwg_size), \"custom\", /*name*/NULL, (int)w, (int)l, /*units*/NULL);\n 2856 | \n 2857 | pc->custom_size.map.ppd = (char *)page_size;\n 2858 | pc->custom_size.map.pwg = pc->custom_pwg_size;\n 2859 | pc->custom_size.width = (int)w;\n 2860 | pc->custom_size.length = (int)l;\n 2861 | \n 2862 | return (&(pc->custom_size));\n 2863 | }\n 2864 | \n 2865 | /*\n 2866 | * Not a custom size - look it up...\n 2867 | */\n 2868 | \n 2869 | for (i = pc->num_sizes, size = pc->sizes; i > 0; i --, size ++)\n 2870 | {\n 2871 | if (!_cups_strcasecmp(page_size, size->map.ppd) ||\n 2872 | !_cups_strcasecmp(page_size, size->map.pwg))\n 2873 | return (size);\n 2874 | }\n 2875 | \n 2876 | /*\n 2877 | * Look up standard sizes...\n 2878 | */\n 2879 | \n 2880 | if ((media = pwgMediaForPPD(page_size)) == NULL)\n 2881 | {\n 2882 | if ((media = pwgMediaForLegacy(page_size)) == NULL)\n 2883 | media = pwgMediaForPWG(page_size);\n 2884 | }\n 2885 | \n 2886 | if (media)\n 2887 | {\n 2888 | pc->custom_size.map.ppd = (char *)page_size;\n 2889 | pc->custom_size.map.pwg = (char *)media->pwg;\n 2890 | pc->custom_size.width = media->width;\n 2891 | pc->custom_size.length = media->length;\n 2892 | \n 2893 | return (&(pc->custom_size));\n 2894 | }\n 2895 | \n 2896 | return (NULL);\n 2897 | }\n 2898 | \n 2899 | \n 2900 | /*\n 2901 | * '_ppdCacheGetSource()' - Get the PWG media-source associated with a PPD\n 2902 | * InputSlot.\n 2903 | */\n 2904 | \n 2905 | const char *\t\t\t\t/* O - PWG media-source keyword */\n 2906 | _ppdCacheGetSource(\n 2907 | _ppd_cache_t *pc,\t\t\t/* I - PPD cache and mapping data */\n 2908 | const char *input_slot)\t\t/* I - PPD InputSlot */\n 2909 | {\n 2910 | int\t\ti;\t\t\t/* Looping var */\n 2911 | pwg_map_t\t*source;\t\t/* Current source */\n 2912 | \n 2913 | \n 2914 | /*\n 2915 | * Range check input...\n 2916 | */\n 2917 | \n 2918 | if (!pc || !input_slot)\n 2919 | return (NULL);\n 2920 | \n 2921 | for (i = pc->num_sources, source = pc->sources; i > 0; i --, source ++)\n 2922 | if (!_cups_strcasecmp(input_slot, source->ppd) || !_cups_strcasecmp(input_slot, source->pwg))\n 2923 | return (source->pwg);\n 2924 | \n 2925 | return (NULL);\n 2926 | }\n 2927 | \n 2928 | \n 2929 | /*", "src_commits": "[{\"path\":\"/src/cups\",\"rev\":\"3935a0ac421137a7b2e7fec176527180bcd8a800\",\"url\":\"https://github.com/OpenPrinting/cups\"},{\"path\":\"/src/fuzzing\",\"rev\":\"152052188b5bfadfb5c258ec9dfbc9c6329fd0b6\",\"url\":\"https://github.com/OpenPrinting/fuzzing.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_ppd_gen_cache\"]", "cnt": 3, "coverage_keys": "[\"/src/cups/cups/ppd-cache.c\"]", "target_text": "Reach line at /src/cups/cups/ppd-cache.c:2829 (observed count 3).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cups:v2026-07-test1@sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_digest": "sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cups:merged:src/cups/cups/ppd.c:1440", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cups", "harness": "merged", "harness_binaries": "[\"fuzz_array\", \"fuzz_cups\", \"fuzz_http_core\", \"fuzz_ipp\", \"fuzz_ipp_gen\", \"fuzz_ppd_gen_1\", \"fuzz_ppd_gen_cache\", \"fuzz_ppd_gen_conflicts\", \"fuzz_raster\"]", "language": "c", "file": "/src/cups/cups/ppd.c", "line_start": 1440, "line_end": 1440, "line_count": 1, "function": "", "source_snippet": " 1340 | \t cupsCopyString(option->text, name, sizeof(option->text));\n 1341 | }\n 1342 | \n 1343 | option->section = PPD_ORDER_ANY;\n 1344 | \n 1345 | free(string);\n 1346 | string = NULL;\n 1347 | \n 1348 | /*\n 1349 | * Add a custom option choice if we have already seen a CustomFoo\n 1350 | * attribute...\n 1351 | */\n 1352 | \n 1353 | if (!_cups_strcasecmp(name, \"PageRegion\"))\n 1354 | cupsCopyString(custom_name, \"CustomPageSize\", sizeof(custom_name));\n 1355 | else\n 1356 | snprintf(custom_name, sizeof(custom_name), \"Custom%s\", name);\n 1357 | \n 1358 | if ((custom_attr = ppdFindAttr(ppd, custom_name, \"True\")) != NULL)\n 1359 | {\n 1360 | if ((choice = ppdFindChoice(option, \"Custom\")) == NULL)\n 1361 | \t if ((choice = ppd_add_choice(option, \"Custom\")) == NULL)\n 1362 | \t {\n 1363 | \t DEBUG_puts(\"1_ppdOpen: Unable to add Custom choice!\");\n 1364 | \n 1365 | \t pg->ppd_status = PPD_ALLOC_ERROR;\n 1366 | \n 1367 | \t goto error;\n 1368 | \t }\n 1369 | \n 1370 | \tcupsCopyString(choice->text,\n 1371 | \t custom_attr->text[0] ? custom_attr->text : _(\"Custom\"),\n 1372 | \t\tsizeof(choice->text));\n 1373 | choice->code = strdup(custom_attr->value);\n 1374 | }\n 1375 | }\n 1376 | else if (!strcmp(keyword, \"JCLOpenUI\"))\n 1377 | {\n 1378 | /*\n 1379 | * Don't allow nesting of options...\n 1380 | */\n 1381 | \n 1382 | if (option && pg->ppd_conform == PPD_CONFORM_STRICT)\n 1383 | {\n 1384 | pg->ppd_status = PPD_NESTED_OPEN_UI;\n 1385 | \n 1386 | \tgoto error;\n 1387 | }\n 1388 | \n 1389 | /*\n 1390 | * Find the JCL group, and add if needed...\n 1391 | */\n 1392 | \n 1393 | group = ppd_get_group(ppd, \"JCL\", _(\"JCL\"), pg, encoding);\n 1394 | \n 1395 | if (group == NULL)\n 1396 | \tgoto error;\n 1397 | \n 1398 | /*\n 1399 | * Add an option record to the current JCLs...\n 1400 | */\n 1401 | \n 1402 | if (name[0] == '*')\n 1403 | _cups_strcpy(name, name + 1);\n 1404 | \n 1405 | option = ppd_get_option(group, name);\n 1406 | \n 1407 | if (option == NULL)\n 1408 | {\n 1409 | pg->ppd_status = PPD_ALLOC_ERROR;\n 1410 | \n 1411 | \tgoto error;\n 1412 | }\n 1413 | \n 1414 | /*\n 1415 | * Now fill in the initial information for the option...\n 1416 | */\n 1417 | \n 1418 | if (string && !strcmp(string, \"PickMany\"))\n 1419 | option->ui = PPD_UI_PICKMANY;\n 1420 | else if (string && !strcmp(string, \"Boolean\"))\n 1421 | option->ui = PPD_UI_BOOLEAN;\n 1422 | else if (string && !strcmp(string, \"PickOne\"))\n 1423 | option->ui = PPD_UI_PICKONE;\n 1424 | else\n 1425 | {\n 1426 | pg->ppd_status = PPD_BAD_OPEN_UI;\n 1427 | \n 1428 | \tgoto error;\n 1429 | }\n 1430 | \n 1431 | for (j = 0; j < ppd->num_attrs; j ++)\n 1432 | \tif (!strncmp(ppd->attrs[j]->name, \"Default\", 7) &&\n 1433 | \t !strcmp(ppd->attrs[j]->name + 7, name) &&\n 1434 | \t ppd->attrs[j]->value)\n 1435 | \t{\n 1436 | \t DEBUG_printf(\"2_ppdOpen: Setting Default%s to %s via attribute...\", option->keyword, ppd->attrs[j]->value);\n 1437 | \t cupsCopyString(option->defchoice, ppd->attrs[j]->value,\n 1438 | \t sizeof(option->defchoice));\n 1439 | \t break;\n> 1440 | \t}\n 1441 | \n 1442 | if (text[0])\n 1443 | cupsCharsetToUTF8((cups_utf8_t *)option->text, text,\n 1444 | \t sizeof(option->text), encoding);\n 1445 | else\n 1446 | cupsCopyString(option->text, name, sizeof(option->text));\n 1447 | \n 1448 | option->section = PPD_ORDER_JCL;\n 1449 | group = NULL;\n 1450 | \n 1451 | free(string);\n 1452 | string = NULL;\n 1453 | \n 1454 | /*\n 1455 | * Add a custom option choice if we have already seen a CustomFoo\n 1456 | * attribute...\n 1457 | */\n 1458 | \n 1459 | snprintf(custom_name, sizeof(custom_name), \"Custom%s\", name);\n 1460 | \n 1461 | if ((custom_attr = ppdFindAttr(ppd, custom_name, \"True\")) != NULL)\n 1462 | {\n 1463 | \tif ((choice = ppd_add_choice(option, \"Custom\")) == NULL)\n 1464 | \t{\n 1465 | \t DEBUG_puts(\"1_ppdOpen: Unable to add Custom choice!\");\n 1466 | \n 1467 | \t pg->ppd_status = PPD_ALLOC_ERROR;\n 1468 | \n 1469 | \t goto error;\n 1470 | \t}\n 1471 | \n 1472 | \tcupsCopyString(choice->text,\n 1473 | \t custom_attr->text[0] ? custom_attr->text : _(\"Custom\"),\n 1474 | \t\tsizeof(choice->text));\n 1475 | choice->code = strdup(custom_attr->value);\n 1476 | }\n 1477 | }\n 1478 | else if (!strcmp(keyword, \"CloseUI\"))\n 1479 | {\n 1480 | if ((!option || option->section == PPD_ORDER_JCL) && pg->ppd_conform == PPD_CONFORM_STRICT)\n 1481 | {\n 1482 | pg->ppd_status = PPD_BAD_CLOSE_UI;\n 1483 | \n 1484 | \tgoto error;\n 1485 | }\n 1486 | \n 1487 | if (option && (!_cups_strcasecmp(option->defchoice, \"custom\") || !_cups_strncasecmp(option->defchoice, \"custom.\", 7)))\n 1488 | {\n 1489 | /*\n 1490 | \t* \"*DefaultOption: Custom...\" may set the default to a custom value\n 1491 | \t* or (for a very small number of incompatible PPD files) select a\n 1492 | \t* standard choice for the option, which CUPS renames to \"_Custom...\"\n 1493 | \t* to avoid compatibility issues. See which this is...\n 1494 | \t*/\n 1495 | \n 1496 | char tchoice[PPD_MAX_NAME];\t/* Temporary choice name */\n 1497 | \n 1498 | \tsnprintf(tchoice, sizeof(tchoice), \"_%s\", option->defchoice);\n 1499 | \n 1500 | \tif (ppdFindChoice(option, tchoice))\n 1501 | \t{\n 1502 | \t cupsCopyString(option->defchoice, tchoice, sizeof(option->defchoice));\n 1503 | \n 1504 | \t DEBUG_printf(\"2_ppdOpen: Reset Default%s to %s...\", option->keyword, tchoice);\n 1505 | \t}\n 1506 | }\n 1507 | \n 1508 | option = NULL;\n 1509 | \n 1510 | free(string);\n 1511 | string = NULL;\n 1512 | }\n 1513 | else if (!strcmp(keyword, \"JCLCloseUI\"))\n 1514 | {\n 1515 | if ((!option || option->section != PPD_ORDER_JCL) && pg->ppd_conform == PPD_CONFORM_STRICT)\n 1516 | {\n 1517 | pg->ppd_status = PPD_BAD_CLOSE_UI;\n 1518 | \n 1519 | \tgoto error;\n 1520 | }\n 1521 | \n 1522 | if (option && (!_cups_strcasecmp(option->defchoice, \"custom\") || !_cups_strncasecmp(option->defchoice, \"custom.\", 7)))\n 1523 | {\n 1524 | /*\n 1525 | \t* \"*DefaultOption: Custom...\" may set the default to a custom value\n 1526 | \t* or (for a very small number of incompatible PPD files) select a\n 1527 | \t* standard choice for the option, which CUPS renames to \"_Custom...\"\n 1528 | \t* to avoid compatibility issues. See which this is...\n 1529 | \t*/\n 1530 | \n 1531 | char tchoice[PPD_MAX_NAME];\t/* Temporary choice name */\n 1532 | \n 1533 | \tsnprintf(tchoice, sizeof(tchoice), \"_%s\", option->defchoice);\n 1534 | \n 1535 | \tif (ppdFindChoice(option, tchoice))\n 1536 | \t{\n 1537 | \t cupsCopyString(option->defchoice, tchoice, sizeof(option->defchoice));\n 1538 | \n 1539 | \t DEBUG_printf(\"2_ppdOpen: Reset Default%s to %s...\", option->keyword, tchoice);\n 1540 | \t}", "src_commits": "[{\"path\":\"/src/cups\",\"rev\":\"3935a0ac421137a7b2e7fec176527180bcd8a800\",\"url\":\"https://github.com/OpenPrinting/cups\"},{\"path\":\"/src/fuzzing\",\"rev\":\"152052188b5bfadfb5c258ec9dfbc9c6329fd0b6\",\"url\":\"https://github.com/OpenPrinting/fuzzing.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_ppd_gen_1\",\"fuzz_ppd_gen_cache\",\"fuzz_ppd_gen_conflicts\"]", "cnt": 29600, "coverage_keys": "[\"/src/cups/cups/ppd.c\"]", "target_text": "Reach line at /src/cups/cups/ppd.c:1440 (observed count 29600).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cups:v2026-07-test1@sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_digest": "sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cups:merged:src/cups/cups/ppd-cache.c:2825", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cups", "harness": "merged", "harness_binaries": "[\"fuzz_array\", \"fuzz_cups\", \"fuzz_http_core\", \"fuzz_ipp\", \"fuzz_ipp_gen\", \"fuzz_ppd_gen_1\", \"fuzz_ppd_gen_cache\", \"fuzz_ppd_gen_conflicts\", \"fuzz_raster\"]", "language": "c", "file": "/src/cups/cups/ppd-cache.c", "line_start": 2825, "line_end": 2825, "line_count": 1, "function": "", "source_snippet": " 2725 | jobsize.length <= pc->custom_max_length)\n 2726 | {\n 2727 | /*\n 2728 | * In range, format as Custom.WWWWxLLLL (points).\n 2729 | */\n 2730 | \n 2731 | snprintf(pc->custom_ppd_size, sizeof(pc->custom_ppd_size), \"Custom.%dx%d\",\n 2732 | (int)PWG_TO_POINTS(jobsize.width), (int)PWG_TO_POINTS(jobsize.length));\n 2733 | \n 2734 | if (margins_set && exact)\n 2735 | {\n 2736 | dleft = pc->custom_size.left - jobsize.left;\n 2737 | dright = pc->custom_size.right - jobsize.right;\n 2738 | dtop = pc->custom_size.top - jobsize.top;\n 2739 | dbottom = pc->custom_size.bottom - jobsize.bottom;\n 2740 | \n 2741 | if (dleft > -35 && dleft < 35 && dright > -35 && dright < 35 &&\n 2742 | dtop > -35 && dtop < 35 && dbottom > -35 && dbottom < 35)\n 2743 | \t*exact = 1;\n 2744 | }\n 2745 | else if (exact)\n 2746 | *exact = 1;\n 2747 | \n 2748 | DEBUG_printf(\"1_ppdCacheGetPageSize: Returning \\\"%s\\\" (custom)\", pc->custom_ppd_size);\n 2749 | \n 2750 | return (pc->custom_ppd_size);\n 2751 | }\n 2752 | \n 2753 | /*\n 2754 | * No custom page size support or the size is out of range - return NULL.\n 2755 | */\n 2756 | \n 2757 | DEBUG_puts(\"1_ppdCacheGetPageSize: Returning NULL\");\n 2758 | \n 2759 | return (NULL);\n 2760 | }\n 2761 | \n 2762 | \n 2763 | /*\n 2764 | * '_ppdCacheGetSize()' - Get the PWG size associated with a PPD PageSize.\n 2765 | */\n 2766 | \n 2767 | pwg_size_t *\t\t\t\t/* O - PWG size or NULL */\n 2768 | _ppdCacheGetSize(\n 2769 | _ppd_cache_t *pc,\t\t\t/* I - PPD cache and mapping data */\n 2770 | const char *page_size,\t\t/* I - PPD PageSize */\n 2771 | ppd_size_t *ppd_size)\t\t/* I - PPD page size information */\n 2772 | {\n 2773 | int\t\ti;\t\t\t/* Looping var */\n 2774 | pwg_media_t\t*media;\t\t\t/* Media */\n 2775 | pwg_size_t\t*size;\t\t\t/* Current size */\n 2776 | \n 2777 | \n 2778 | /*\n 2779 | * Range check input...\n 2780 | */\n 2781 | \n 2782 | if (!pc || !page_size)\n 2783 | return (NULL);\n 2784 | \n 2785 | if (!_cups_strcasecmp(page_size, \"Custom\") || !_cups_strncasecmp(page_size, \"Custom.\", 7))\n 2786 | {\n 2787 | /*\n 2788 | * Custom size; size name can be one of the following:\n 2789 | *\n 2790 | * Custom.WIDTHxLENGTHin - Size in inches\n 2791 | * Custom.WIDTHxLENGTHft - Size in feet\n 2792 | * Custom.WIDTHxLENGTHcm - Size in centimeters\n 2793 | * Custom.WIDTHxLENGTHmm - Size in millimeters\n 2794 | * Custom.WIDTHxLENGTHm - Size in meters\n 2795 | * Custom.WIDTHxLENGTH[pt] - Size in points\n 2796 | */\n 2797 | \n 2798 | double\t\tw, l;\t\t/* Width and length of page */\n 2799 | char\t\t*ptr;\t\t/* Pointer into PageSize */\n 2800 | struct lconv\t*loc;\t\t/* Locale data */\n 2801 | \n 2802 | if (page_size[6])\n 2803 | {\n 2804 | loc = localeconv();\n 2805 | w = (float)_cupsStrScand(page_size + 7, &ptr, loc);\n 2806 | if (!ptr || *ptr != 'x')\n 2807 | \treturn (NULL);\n 2808 | \n 2809 | l = (float)_cupsStrScand(ptr + 1, &ptr, loc);\n 2810 | if (!ptr)\n 2811 | \treturn (NULL);\n 2812 | \n 2813 | if (!_cups_strcasecmp(ptr, \"in\"))\n 2814 | {\n 2815 | \tw *= 2540.0;\n 2816 | \tl *= 2540.0;\n 2817 | }\n 2818 | else if (!_cups_strcasecmp(ptr, \"ft\"))\n 2819 | {\n 2820 | \tw *= 12.0 * 2540.0;\n 2821 | \tl *= 12.0 * 2540.0;\n 2822 | }\n 2823 | else if (!_cups_strcasecmp(ptr, \"mm\"))\n 2824 | {\n> 2825 | \tw *= 100.0;\n 2826 | \tl *= 100.0;\n 2827 | }\n 2828 | else if (!_cups_strcasecmp(ptr, \"cm\"))\n 2829 | {\n 2830 | \tw *= 1000.0;\n 2831 | \tl *= 1000.0;\n 2832 | }\n 2833 | else if (!_cups_strcasecmp(ptr, \"m\"))\n 2834 | {\n 2835 | \tw *= 100000.0;\n 2836 | \tl *= 100000.0;\n 2837 | }\n 2838 | else\n 2839 | {\n 2840 | \tw *= 2540.0 / 72.0;\n 2841 | \tl *= 2540.0 / 72.0;\n 2842 | }\n 2843 | }\n 2844 | else if (ppd_size)\n 2845 | {\n 2846 | w = ppd_size->width * 2540.0 / 72.0;\n 2847 | l = ppd_size->length * 2540.0 / 72.0;\n 2848 | }\n 2849 | else\n 2850 | {\n 2851 | // No custom size information...\n 2852 | return (NULL);\n 2853 | }\n 2854 | \n 2855 | pwgFormatSizeName(pc->custom_pwg_size, sizeof(pc->custom_pwg_size), \"custom\", /*name*/NULL, (int)w, (int)l, /*units*/NULL);\n 2856 | \n 2857 | pc->custom_size.map.ppd = (char *)page_size;\n 2858 | pc->custom_size.map.pwg = pc->custom_pwg_size;\n 2859 | pc->custom_size.width = (int)w;\n 2860 | pc->custom_size.length = (int)l;\n 2861 | \n 2862 | return (&(pc->custom_size));\n 2863 | }\n 2864 | \n 2865 | /*\n 2866 | * Not a custom size - look it up...\n 2867 | */\n 2868 | \n 2869 | for (i = pc->num_sizes, size = pc->sizes; i > 0; i --, size ++)\n 2870 | {\n 2871 | if (!_cups_strcasecmp(page_size, size->map.ppd) ||\n 2872 | !_cups_strcasecmp(page_size, size->map.pwg))\n 2873 | return (size);\n 2874 | }\n 2875 | \n 2876 | /*\n 2877 | * Look up standard sizes...\n 2878 | */\n 2879 | \n 2880 | if ((media = pwgMediaForPPD(page_size)) == NULL)\n 2881 | {\n 2882 | if ((media = pwgMediaForLegacy(page_size)) == NULL)\n 2883 | media = pwgMediaForPWG(page_size);\n 2884 | }\n 2885 | \n 2886 | if (media)\n 2887 | {\n 2888 | pc->custom_size.map.ppd = (char *)page_size;\n 2889 | pc->custom_size.map.pwg = (char *)media->pwg;\n 2890 | pc->custom_size.width = media->width;\n 2891 | pc->custom_size.length = media->length;\n 2892 | \n 2893 | return (&(pc->custom_size));\n 2894 | }\n 2895 | \n 2896 | return (NULL);\n 2897 | }\n 2898 | \n 2899 | \n 2900 | /*\n 2901 | * '_ppdCacheGetSource()' - Get the PWG media-source associated with a PPD\n 2902 | * InputSlot.\n 2903 | */\n 2904 | \n 2905 | const char *\t\t\t\t/* O - PWG media-source keyword */\n 2906 | _ppdCacheGetSource(\n 2907 | _ppd_cache_t *pc,\t\t\t/* I - PPD cache and mapping data */\n 2908 | const char *input_slot)\t\t/* I - PPD InputSlot */\n 2909 | {\n 2910 | int\t\ti;\t\t\t/* Looping var */\n 2911 | pwg_map_t\t*source;\t\t/* Current source */\n 2912 | \n 2913 | \n 2914 | /*\n 2915 | * Range check input...\n 2916 | */\n 2917 | \n 2918 | if (!pc || !input_slot)\n 2919 | return (NULL);\n 2920 | \n 2921 | for (i = pc->num_sources, source = pc->sources; i > 0; i --, source ++)\n 2922 | if (!_cups_strcasecmp(input_slot, source->ppd) || !_cups_strcasecmp(input_slot, source->pwg))\n 2923 | return (source->pwg);\n 2924 | \n 2925 | return (NULL);", "src_commits": "[{\"path\":\"/src/cups\",\"rev\":\"3935a0ac421137a7b2e7fec176527180bcd8a800\",\"url\":\"https://github.com/OpenPrinting/cups\"},{\"path\":\"/src/fuzzing\",\"rev\":\"152052188b5bfadfb5c258ec9dfbc9c6329fd0b6\",\"url\":\"https://github.com/OpenPrinting/fuzzing.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_ppd_gen_cache\"]", "cnt": 3, "coverage_keys": "[\"/src/cups/cups/ppd-cache.c\"]", "target_text": "Reach line at /src/cups/cups/ppd-cache.c:2825 (observed count 3).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cups:v2026-07-test1@sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_digest": "sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cups:merged:src/cups/cups/file.c:701", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cups", "harness": "merged", "harness_binaries": "[\"fuzz_array\", \"fuzz_cups\", \"fuzz_http_core\", \"fuzz_ipp\", \"fuzz_ipp_gen\", \"fuzz_ppd_gen_1\", \"fuzz_ppd_gen_cache\", \"fuzz_ppd_gen_conflicts\", \"fuzz_raster\"]", "language": "c", "file": "/src/cups/cups/file.c", "line_start": 701, "line_end": 701, "line_count": 1, "function": "", "source_snippet": " 601 | \n 602 | return (*(fp->ptr)++ & 255);\n 603 | }\n 604 | \n 605 | \n 606 | //\n 607 | // 'cupsFileGetConf()' - Get a line from a configuration file.\n 608 | //\n 609 | // @since CUPS 1.2@\n 610 | //\n 611 | \n 612 | char *\t\t\t\t\t// O - Line read or @code NULL@ on end of file or error\n 613 | cupsFileGetConf(cups_file_t *fp,\t// I - CUPS file\n 614 | char *buf,\t// O - String buffer\n 615 | \t\tsize_t buflen,\t// I - Size of string buffer\n 616 | char **value,\t// O - Pointer to value\n 617 | \t\tint *linenum)\t// IO - Current line number\n 618 | {\n 619 | char\t*ptr;\t\t\t\t// Pointer into line\n 620 | \n 621 | \n 622 | // Range check input...\n 623 | DEBUG_printf(\"2cupsFileGetConf(fp=%p, buf=%p, buflen=\" CUPS_LLFMT \", value=%p, linenum=%p)\", (void *)fp, (void *)buf, CUPS_LLCAST buflen, (void *)value, (void *)linenum);\n 624 | \n 625 | if (!fp || (fp->mode != 'r' && fp->mode != 's') || !buf || buflen < 2 || !value)\n 626 | {\n 627 | if (value)\n 628 | *value = NULL;\n 629 | \n 630 | return (NULL);\n 631 | }\n 632 | \n 633 | // Read the next non-comment line...\n 634 | *value = NULL;\n 635 | \n 636 | while (cupsFileGets(fp, buf, buflen))\n 637 | {\n 638 | (*linenum) ++;\n 639 | \n 640 | // Handle escaped characters and strip any comments...\n 641 | for (ptr = buf; *ptr; ptr ++)\n 642 | {\n 643 | if (*ptr == '#')\n 644 | {\n 645 | // Strip comment text...\n 646 | *ptr = '\\0';\n 647 | break;\n 648 | }\n 649 | else if (*ptr == '\\\\' && (ptr[1] == '\\\\' || ptr[1] == '#' || ptr[1] == 'n' || ptr[1] == 'r'))\n 650 | {\n 651 | \t// \\\\, \\#, \\n, or \\r, remove backslash and update the escaped char as needed...\n 652 | \t_cups_strcpy(ptr, ptr + 1);\n 653 | \n 654 | \tif (*ptr == 'n')\n 655 | \t *ptr = '\\n';\n 656 | \telse if (*ptr == 'r')\n 657 | \t *ptr = '\\r';\n 658 | }\n 659 | }\n 660 | \n 661 | // Strip leading whitespace...\n 662 | for (ptr = buf; *ptr; ptr ++)\n 663 | {\n 664 | if (!_cups_isspace(*ptr))\n 665 | break;\n 666 | }\n 667 | \n 668 | if (ptr > buf)\n 669 | _cups_strcpy(buf, ptr);\n 670 | \n 671 | // See if there is anything left...\n 672 | if (buf[0])\n 673 | {\n 674 | // Yes, grab any value and return...\n 675 | for (ptr = buf; *ptr; ptr ++)\n 676 | {\n 677 | if (_cups_isspace(*ptr))\n 678 | \t break;\n 679 | }\n 680 | \n 681 | if (*ptr)\n 682 | {\n 683 | // Have a value, skip any other spaces...\n 684 | while (_cups_isspace(*ptr))\n 685 | \t *ptr++ = '\\0';\n 686 | \n 687 | if (*ptr)\n 688 | \t *value = ptr;\n 689 | \n 690 | // Strip trailing whitespace and > for lines that begin with <...\n 691 | ptr += strlen(ptr) - 1;\n 692 | \n 693 | if (buf[0] == '<' && *ptr == '>')\n 694 | {\n 695 | \t *ptr-- = '\\0';\n 696 | \t}\n 697 | \telse if (buf[0] == '<' && *ptr != '>')\n 698 | {\n 699 | \t // Syntax error...\n 700 | \t *value = NULL;\n> 701 | \t return (buf);\n 702 | \t}\n 703 | \n 704 | while (ptr > *value && _cups_isspace(*ptr))\n 705 | \t *ptr-- = '\\0';\n 706 | }\n 707 | \n 708 | // Return the line...\n 709 | return (buf);\n 710 | }\n 711 | }\n 712 | \n 713 | return (NULL);\n 714 | }\n 715 | \n 716 | \n 717 | //\n 718 | // 'cupsFileGetLine()' - Get a CR and/or LF-terminated line that may\n 719 | // contain binary data.\n 720 | //\n 721 | // This function differs from @link cupsFileGets@ in that the trailing CR\n 722 | // and LF are preserved, as is any binary data on the line. The buffer is\n 723 | // nul-terminated, however you should use the returned length to determine\n 724 | // the number of bytes on the line.\n 725 | //\n 726 | // @since CUPS 1.2@\n 727 | //\n 728 | \n 729 | size_t\t\t\t\t\t// O - Number of bytes on line or 0 on end of file\n 730 | cupsFileGetLine(cups_file_t *fp,\t// I - File to read from\n 731 | char *buf,\t// I - Buffer\n 732 | size_t buflen)\t// I - Size of buffer\n 733 | {\n 734 | int\t\tch;\t\t\t// Character from file\n 735 | char\t\t*ptr,\t\t\t// Current position in line buffer\n 736 | \t\t*end;\t\t\t// End of line buffer\n 737 | \n 738 | \n 739 | // Range check input...\n 740 | DEBUG_printf(\"2cupsFileGetLine(fp=%p, buf=%p, buflen=\" CUPS_LLFMT \")\", (void *)fp, (void *)buf, CUPS_LLCAST buflen);\n 741 | \n 742 | if (!fp || (fp->mode != 'r' && fp->mode != 's') || !buf || buflen < 3)\n 743 | return (0);\n 744 | \n 745 | // Now loop until we have a valid line...\n 746 | for (ptr = buf, end = buf + buflen - 2; ptr < end ;)\n 747 | {\n 748 | if (fp->ptr >= fp->end)\n 749 | if (cups_fill(fp) <= 0)\n 750 | break;\n 751 | \n 752 | *ptr++ = ch = *(fp->ptr)++;\n 753 | fp->pos ++;\n 754 | \n 755 | if (ch == '\\r')\n 756 | {\n 757 | // Check for CR LF...\n 758 | if (fp->ptr >= fp->end)\n 759 | \tif (cups_fill(fp) <= 0)\n 760 | break;\n 761 | \n 762 | if (*(fp->ptr) == '\\n')\n 763 | {\n 764 | *ptr++ = *(fp->ptr)++;\n 765 | \tfp->pos ++;\n 766 | }\n 767 | \n 768 | break;\n 769 | }\n 770 | else if (ch == '\\n')\n 771 | {\n 772 | // Line feed ends a line...\n 773 | break;\n 774 | }\n 775 | }\n 776 | \n 777 | *ptr = '\\0';\n 778 | \n 779 | DEBUG_printf(\"4cupsFileGetLine: pos=\" CUPS_LLFMT, CUPS_LLCAST fp->pos);\n 780 | \n 781 | return ((size_t)(ptr - buf));\n 782 | }\n 783 | \n 784 | \n 785 | //\n 786 | // 'cupsFileGets()' - Get a CR and/or LF-terminated line.\n 787 | //\n 788 | // @since CUPS 1.2@\n 789 | //\n 790 | \n 791 | char *\t\t\t\t\t// O - Line read or @code NULL@ on end of file or error\n 792 | cupsFileGets(cups_file_t *fp,\t\t// I - CUPS file\n 793 | char *buf,\t\t// O - String buffer\n 794 | \t size_t buflen)\t// I - Size of string buffer\n 795 | {\n 796 | int\t\tch;\t\t\t// Character from file\n 797 | char\t\t*ptr,\t\t\t// Current position in line buffer\n 798 | \t\t*end;\t\t\t// End of line buffer\n 799 | \n 800 | \n 801 | // Range check input...", "src_commits": "[{\"path\":\"/src/cups\",\"rev\":\"3935a0ac421137a7b2e7fec176527180bcd8a800\",\"url\":\"https://github.com/OpenPrinting/cups\"},{\"path\":\"/src/fuzzing\",\"rev\":\"152052188b5bfadfb5c258ec9dfbc9c6329fd0b6\",\"url\":\"https://github.com/OpenPrinting/fuzzing.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_ipp\",\"fuzz_ipp_gen\",\"fuzz_ppd_gen_cache\"]", "cnt": 6, "coverage_keys": "[\"/src/cups/cups/file.c\"]", "target_text": "Reach line at /src/cups/cups/file.c:701 (observed count 6).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cups:v2026-07-test1@sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_digest": "sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cups:merged:src/cups/cups/ppd-mark.c:940", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cups", "harness": "merged", "harness_binaries": "[\"fuzz_array\", \"fuzz_cups\", \"fuzz_http_core\", \"fuzz_ipp\", \"fuzz_ipp_gen\", \"fuzz_ppd_gen_1\", \"fuzz_ppd_gen_cache\", \"fuzz_ppd_gen_conflicts\", \"fuzz_raster\"]", "language": "c", "file": "/src/cups/cups/ppd-mark.c", "line_start": 940, "line_end": 940, "line_count": 1, "function": "", "source_snippet": " 840 | \t case PPD_CUSTOM_UNKNOWN :\n 841 | \t break;\n 842 | \n 843 | \t case PPD_CUSTOM_CURVE :\n 844 | \t case PPD_CUSTOM_INVCURVE :\n 845 | \t case PPD_CUSTOM_REAL :\n 846 | \t cparam->current.custom_real = (float)_cupsStrScand(choice + 7,\n 847 | \t NULL, loc);\n 848 | \t break;\n 849 | \n 850 | \t case PPD_CUSTOM_POINTS :\n 851 | \t cparam->current.custom_points = (float)_cupsStrScand(choice + 7,\n 852 | \t &units,\n 853 | \t loc);\n 854 | \n 855 | if (units)\n 856 | \t {\n 857 | \tif (!_cups_strcasecmp(units, \"cm\"))\n 858 | \t cparam->current.custom_points *= 72.0f / 2.54f;\n 859 | \telse if (!_cups_strcasecmp(units, \"mm\"))\n 860 | \t cparam->current.custom_points *= 72.0f / 25.4f;\n 861 | \telse if (!_cups_strcasecmp(units, \"m\"))\n 862 | \t cparam->current.custom_points *= 72.0f / 0.0254f;\n 863 | \telse if (!_cups_strcasecmp(units, \"in\"))\n 864 | \t cparam->current.custom_points *= 72.0f;\n 865 | \telse if (!_cups_strcasecmp(units, \"ft\"))\n 866 | \t cparam->current.custom_points *= 12.0f * 72.0f;\n 867 | }\n 868 | \t break;\n 869 | \n 870 | \t case PPD_CUSTOM_INT :\n 871 | \t cparam->current.custom_int = atoi(choice + 7);\n 872 | \t break;\n 873 | \n 874 | \t case PPD_CUSTOM_PASSCODE :\n 875 | \t case PPD_CUSTOM_PASSWORD :\n 876 | \t case PPD_CUSTOM_STRING :\n 877 | \t if (cparam->current.custom_string)\n 878 | \t free(cparam->current.custom_string);\n 879 | \n 880 | \t cparam->current.custom_string = strdup(choice + 7);\n 881 | \t break;\n 882 | \t}\n 883 | }\n 884 | }\n 885 | \n 886 | /*\n 887 | * Make sure that we keep the option marked below...\n 888 | */\n 889 | \n 890 | choice = \"Custom\";\n 891 | }\n 892 | else if (choice[0] == '{')\n 893 | {\n 894 | /*\n 895 | * Handle multi-value custom options...\n 896 | */\n 897 | \n 898 | ppd_coption_t\t*coption;\t/* Custom option */\n 899 | ppd_cparam_t\t*cparam;\t/* Custom parameter */\n 900 | char\t\t*units;\t\t/* Custom points units */\n 901 | int\t\t\tnum_vals;\t/* Number of values */\n 902 | cups_option_t\t*vals,\t\t/* Values */\n 903 | \t\t\t*val;\t\t/* Value */\n 904 | \n 905 | \n 906 | if ((c = ppdFindChoice(o, \"Custom\")) == NULL)\n 907 | return;\n 908 | \n 909 | if ((coption = ppdFindCustomOption(ppd, option)) != NULL)\n 910 | {\n 911 | num_vals = cupsParseOptions(choice, 0, &vals);\n 912 | \n 913 | for (i = 0, val = vals; i < num_vals; i ++, val ++)\n 914 | {\n 915 | if ((cparam = ppdFindCustomParam(coption, val->name)) == NULL)\n 916 | \t continue;\n 917 | \n 918 | \tswitch (cparam->type)\n 919 | \t{\n 920 | \t case PPD_CUSTOM_UNKNOWN :\n 921 | \t break;\n 922 | \n 923 | \t case PPD_CUSTOM_CURVE :\n 924 | \t case PPD_CUSTOM_INVCURVE :\n 925 | \t case PPD_CUSTOM_REAL :\n 926 | \t cparam->current.custom_real = (float)_cupsStrScand(val->value,\n 927 | \t NULL, loc);\n 928 | \t break;\n 929 | \n 930 | \t case PPD_CUSTOM_POINTS :\n 931 | \t cparam->current.custom_points = (float)_cupsStrScand(val->value,\n 932 | \t &units,\n 933 | \t loc);\n 934 | \n 935 | \t if (units)\n 936 | \t {\n 937 | \tif (!_cups_strcasecmp(units, \"cm\"))\n 938 | \t\t cparam->current.custom_points *= 72.0f / 2.54f;\n 939 | \telse if (!_cups_strcasecmp(units, \"mm\"))\n> 940 | \t\t cparam->current.custom_points *= 72.0f / 25.4f;\n 941 | \telse if (!_cups_strcasecmp(units, \"m\"))\n 942 | \t\t cparam->current.custom_points *= 72.0f / 0.0254f;\n 943 | \telse if (!_cups_strcasecmp(units, \"in\"))\n 944 | \t\t cparam->current.custom_points *= 72.0f;\n 945 | \telse if (!_cups_strcasecmp(units, \"ft\"))\n 946 | \t\t cparam->current.custom_points *= 12.0f * 72.0f;\n 947 | \t }\n 948 | \t break;\n 949 | \n 950 | \t case PPD_CUSTOM_INT :\n 951 | \t cparam->current.custom_int = atoi(val->value);\n 952 | \t break;\n 953 | \n 954 | \t case PPD_CUSTOM_PASSCODE :\n 955 | \t case PPD_CUSTOM_PASSWORD :\n 956 | \t case PPD_CUSTOM_STRING :\n 957 | \t if (cparam->current.custom_string)\n 958 | \t\tfree(cparam->current.custom_string);\n 959 | \n 960 | \t cparam->current.custom_string = strdup(val->value);\n 961 | \t break;\n 962 | \t}\n 963 | }\n 964 | \n 965 | cupsFreeOptions(num_vals, vals);\n 966 | }\n 967 | }\n 968 | else\n 969 | {\n 970 | for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)\n 971 | if (!_cups_strcasecmp(c->choice, choice))\n 972 | break;\n 973 | \n 974 | if (!i)\n 975 | return;\n 976 | }\n 977 | \n 978 | /*\n 979 | * Option found; mark it and then handle unmarking any other options.\n 980 | */\n 981 | \n 982 | if (o->ui != PPD_UI_PICKMANY)\n 983 | {\n 984 | /*\n 985 | * Unmark all other choices...\n 986 | */\n 987 | \n 988 | if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, c)) != NULL)\n 989 | {\n 990 | oldc->marked = 0;\n 991 | cupsArrayRemove(ppd->marked, oldc);\n 992 | }\n 993 | \n 994 | if (!_cups_strcasecmp(option, \"PageSize\") || !_cups_strcasecmp(option, \"PageRegion\"))\n 995 | {\n 996 | /*\n 997 | * Mark current page size...\n 998 | */\n 999 | \n 1000 | for (j = 0; j < ppd->num_sizes; j ++)\n 1001 | \tppd->sizes[j].marked = !_cups_strcasecmp(ppd->sizes[j].name,\n 1002 | \t\t choice);\n 1003 | \n 1004 | /*\n 1005 | * Unmark the current PageSize or PageRegion setting, as\n 1006 | * appropriate...\n 1007 | */\n 1008 | \n 1009 | cupsArraySave(ppd->options);\n 1010 | \n 1011 | if (!_cups_strcasecmp(option, \"PageSize\"))\n 1012 | {\n 1013 | \tif ((o = ppdFindOption(ppd, \"PageRegion\")) != NULL)\n 1014 | {\n 1015 | key.option = o;\n 1016 | if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL)\n 1017 | {\n 1018 | oldc->marked = 0;\n 1019 | cupsArrayRemove(ppd->marked, oldc);\n 1020 | }\n 1021 | }\n 1022 | }\n 1023 | else\n 1024 | {\n 1025 | \tif ((o = ppdFindOption(ppd, \"PageSize\")) != NULL)\n 1026 | {\n 1027 | key.option = o;\n 1028 | if ((oldc = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) != NULL)\n 1029 | {\n 1030 | oldc->marked = 0;\n 1031 | cupsArrayRemove(ppd->marked, oldc);\n 1032 | }\n 1033 | }\n 1034 | }\n 1035 | \n 1036 | cupsArrayRestore(ppd->options);\n 1037 | }\n 1038 | else if (!_cups_strcasecmp(option, \"InputSlot\"))\n 1039 | {\n 1040 | /*", "src_commits": "[{\"path\":\"/src/cups\",\"rev\":\"3935a0ac421137a7b2e7fec176527180bcd8a800\",\"url\":\"https://github.com/OpenPrinting/cups\"},{\"path\":\"/src/fuzzing\",\"rev\":\"152052188b5bfadfb5c258ec9dfbc9c6329fd0b6\",\"url\":\"https://github.com/OpenPrinting/fuzzing.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_ppd_gen_1\",\"fuzz_ppd_gen_conflicts\"]", "cnt": 489, "coverage_keys": "[\"/src/cups/cups/ppd-mark.c\"]", "target_text": "Reach line at /src/cups/cups/ppd-mark.c:940 (observed count 489).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cups:v2026-07-test1@sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_digest": "sha256:986901f42872c2d3f3705368e9546e9f792efc957a11541540c4232fb7eaf36d", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cyclonedds:merged:src/cyclonedds/src/ddsrt/src/fibheap.c:258", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cyclonedds", "harness": "merged", "harness_binaries": "[\"fuzz_config_init\", \"fuzz_handle_rtps_message\", \"fuzz_handshake\", \"fuzz_sample_deser\", \"fuzz_security_deser\", \"fuzz_type_object\"]", "language": "c", "file": "/src/cyclonedds/src/ddsrt/src/fibheap.c", "line_start": 258, "line_end": 258, "line_count": 1, "function": "", "source_snippet": " 158 | ddsrt_fibheap_node_t *n = mark;\n 159 | do {\n 160 | n->parent = NULL;\n 161 | n->mark = 0;\n 162 | n = n->next;\n 163 | } while (n != mark);\n 164 | \n 165 | ddsrt_fibheap_merge_nonempty_list (&fh->roots, min->children);\n 166 | }\n 167 | \n 168 | /* iteratively merge roots of equal degree, completely messing up\n 169 | fh->roots, ... */\n 170 | {\n 171 | assert(fh->roots); /* silence GCC's static analyzer */\n 172 | ddsrt_fibheap_node_t *const mark = fh->roots;\n 173 | ddsrt_fibheap_node_t *n = mark;\n 174 | do {\n 175 | ddsrt_fibheap_node_t * const n1 = n->next;\n 176 | \n 177 | /* if n is first root with this high a degree, there's certainly\n 178 | not going to be another root to merge with yet\n 179 | \n 180 | GCC 12 static analyzer warns that roots[n->degree] may be\n 181 | uninitialized, but that is clearly wrong, it is just lazily\n 182 | initialized a few lines down. Always initializing all of\n 183 | roots[] would take care of that, but high-degree nodes are\n 184 | rather rare and extract_min is called very often. */\n 185 | #if __GNUC__ >= 12\n 186 | DDSRT_WARNING_GNUC_OFF(analyzer-use-of-uninitialized-value)\n 187 | #endif\n 188 | while (n->degree < min_degree_noninit && roots[n->degree]) {\n 189 | unsigned const degree = n->degree;\n 190 | ddsrt_fibheap_node_t *u, *v;\n 191 | \n 192 | if (cmp (fhdef, roots[degree], n) < 0) {\n 193 | u = roots[degree]; v = n;\n 194 | } else {\n 195 | u = n; v = roots[degree];\n 196 | }\n 197 | roots[degree] = NULL;\n 198 | ddsrt_fibheap_add_as_child (u, v);\n 199 | n = u;\n 200 | }\n 201 | #if __GNUC__ >= 12\n 202 | DDSRT_WARNING_GNUC_ON(analyzer-use-of-uninitialized-value)\n 203 | #endif\n 204 | \n 205 | /* n may have changed, hence need to retest whether or not\n 206 | enough of roots has been initialised -- note that\n 207 | initialising roots[n->degree] is unnecessary, but easier */\n 208 | assert (n->degree <= MAX_DEGREE);\n 209 | while (min_degree_noninit <= n->degree) {\n 210 | roots[min_degree_noninit++] = NULL;\n 211 | }\n 212 | roots[n->degree] = n;\n 213 | n = n1;\n 214 | } while (n != mark);\n 215 | }\n 216 | \n 217 | /* ... but we don't mind because we have roots[], we can scan linear\n 218 | memory at an astonishing rate, and we need to compare the root\n 219 | keys anyway to find the minimum */\n 220 | {\n 221 | ddsrt_fibheap_node_t *mark, *cursor, *newmin;\n 222 | uint32_t i;\n 223 | for (i = 0; roots[i] == NULL; i++) {\n 224 | assert (i+1 < min_degree_noninit);\n 225 | }\n 226 | newmin = roots[i];\n 227 | assert (newmin != NULL);\n 228 | mark = cursor = roots[i];\n 229 | for (++i; i < min_degree_noninit; i++) {\n 230 | if (roots[i]) {\n 231 | ddsrt_fibheap_node_t * const r = roots[i];\n 232 | if (cmp (fhdef, r, newmin) < 0)\n 233 | newmin = r;\n 234 | r->prev = cursor;\n 235 | cursor->next = r;\n 236 | cursor = r;\n 237 | }\n 238 | }\n 239 | mark->prev = cursor;\n 240 | cursor->next = mark;\n 241 | \n 242 | fh->roots = newmin;\n 243 | }\n 244 | \n 245 | return (void *) ((char *) min - fhdef->offset);\n 246 | }\n 247 | \n 248 | static void ddsrt_fibheap_cutnode (ddsrt_fibheap_t *fh, ddsrt_fibheap_node_t *node)\n 249 | {\n 250 | /* by marking the node, we ensure it gets cut */\n 251 | node->mark = 1;\n 252 | \n 253 | /* traverse towards the root, cutting marked nodes on the way */\n 254 | while (node->parent && node->mark) {\n 255 | ddsrt_fibheap_node_t *parent = node->parent;\n 256 | \n 257 | assert (parent->degree > 0);\n> 258 | ddsrt_fibheap_delete_one_from_list (&parent->children, node);\n 259 | parent->degree--;\n 260 | \n 261 | node->mark = 0;\n 262 | node->parent = NULL;\n 263 | node->next = node->prev = node;\n 264 | \n 265 | /* we assume heap properties haven't been violated, and therefore\n 266 | none of the nodes we cut can become the new minimum */\n 267 | ddsrt_fibheap_merge_nonempty_list (&fh->roots, node);\n 268 | \n 269 | node = parent;\n 270 | }\n 271 | \n 272 | /* if we stopped because we hit an unmarked interior node, we must\n 273 | mark it */\n 274 | if (node->parent) {\n 275 | node->mark = 1;\n 276 | }\n 277 | }\n 278 | \n 279 | void ddsrt_fibheap_decrease_key (const ddsrt_fibheap_def_t *fhdef, ddsrt_fibheap_t *fh, const void *vnode)\n 280 | {\n 281 | /* fibheap node is opaque => nothing in node changes as far as\n 282 | caller is concerned => declare as const argument, then drop the\n 283 | const qualifier */\n 284 | ddsrt_fibheap_node_t *node = (ddsrt_fibheap_node_t *) ((char *) vnode + fhdef->offset);\n 285 | \n 286 | if (node->parent && cmp (fhdef, node->parent, node) <= 0) {\n 287 | /* heap property not violated, do nothing */\n 288 | } else {\n 289 | if (node->parent) {\n 290 | /* heap property violated by decreasing the key, but we cut it\n 291 | pretending nothing has happened yet, then fix up the minimum if\n 292 | this node is the new minimum */\n 293 | ddsrt_fibheap_cutnode (fh, node);\n 294 | }\n 295 | if (cmp (fhdef, node, fh->roots) < 0) {\n 296 | fh->roots = node;\n 297 | }\n 298 | }\n 299 | }\n 300 | \n 301 | void ddsrt_fibheap_delete (const ddsrt_fibheap_def_t *fhdef, ddsrt_fibheap_t *fh, const void *vnode)\n 302 | {\n 303 | /* fibheap node is opaque => nothing in node changes as far as\n 304 | caller is concerned => declare as const argument, then drop the\n 305 | const qualifier */\n 306 | ddsrt_fibheap_node_t *node = (ddsrt_fibheap_node_t *) ((char *) vnode + fhdef->offset);\n 307 | \n 308 | /* essentially decreasekey(node);extractmin while pretending the\n 309 | node key is -infinity. That means we can't directly call\n 310 | decreasekey, because it considers the actual value of the key. */\n 311 | if (node->parent != NULL) {\n 312 | ddsrt_fibheap_cutnode (fh, node);\n 313 | }\n 314 | fh->roots = node;\n 315 | (void) ddsrt_fibheap_extract_min (fhdef, fh);\n 316 | }", "src_commits": "[{\"path\":\"/src/cyclonedds\",\"rev\":\"3029b992768886f555dab44c6a33f40ab09cb225\",\"url\":\"https://github.com/eclipse-cyclonedds/cyclonedds\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_config_init\",\"fuzz_handle_rtps_message\",\"fuzz_handshake\",\"fuzz_sample_deser\",\"fuzz_type_object\"]", "cnt": 865, "coverage_keys": "[\"/src/cyclonedds/src/ddsrt/src/fibheap.c\"]", "target_text": "Reach line at /src/cyclonedds/src/ddsrt/src/fibheap.c:258 (observed count 865).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cyclonedds:v2026-07-test1@sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_digest": "sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cyclonedds:merged:src/cyclonedds/src/core/ddsi/src/ddsi_lease.c:134", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cyclonedds", "harness": "merged", "harness_binaries": "[\"fuzz_config_init\", \"fuzz_handle_rtps_message\", \"fuzz_handshake\", \"fuzz_sample_deser\", \"fuzz_security_deser\", \"fuzz_type_object\"]", "language": "c", "file": "/src/cyclonedds/src/core/ddsi/src/ddsi_lease.c", "line_start": 134, "line_end": 134, "line_count": 1, "function": "", "source_snippet": " 34 | #include \"ddsi__endpoint.h\"\n 35 | #include \"ddsi__proxy_endpoint.h\"\n 36 | #include \"ddsi__proxy_participant.h\"\n 37 | \n 38 | /* This is absolute bottom for signed integers, where -x = x and yet x\n 39 | != 0 -- and note that it had better be 2's complement machine! */\n 40 | #define TSCHED_NOT_ON_HEAP INT64_MIN\n 41 | \n 42 | const ddsrt_fibheap_def_t lease_fhdef = DDSRT_FIBHEAPDEF_INITIALIZER (offsetof (struct ddsi_lease, heapnode), ddsi_compare_lease_tsched);\n 43 | \n 44 | static void force_lease_check (struct ddsi_gcreq_queue *gcreq_queue)\n 45 | {\n 46 | ddsi_gcreq_enqueue (ddsi_gcreq_new (gcreq_queue, ddsi_gcreq_free));\n 47 | }\n 48 | \n 49 | int ddsi_compare_lease_tsched (const void *va, const void *vb)\n 50 | {\n 51 | const struct ddsi_lease *a = va;\n 52 | const struct ddsi_lease *b = vb;\n 53 | return (a->tsched.v == b->tsched.v) ? 0 : (a->tsched.v < b->tsched.v) ? -1 : 1;\n 54 | }\n 55 | \n 56 | int ddsi_compare_lease_tdur (const void *va, const void *vb)\n 57 | {\n 58 | const struct ddsi_lease *a = va;\n 59 | const struct ddsi_lease *b = vb;\n 60 | return (a->tdur == b->tdur) ? 0 : (a->tdur < b->tdur) ? -1 : 1;\n 61 | }\n 62 | \n 63 | void ddsi_lease_management_init (struct ddsi_domaingv *gv)\n 64 | {\n 65 | ddsrt_mutex_init (&gv->leaseheap_lock);\n 66 | ddsrt_fibheap_init (&lease_fhdef, &gv->leaseheap);\n 67 | }\n 68 | \n 69 | void ddsi_lease_management_term (struct ddsi_domaingv *gv)\n 70 | {\n 71 | assert (ddsrt_fibheap_min (&lease_fhdef, &gv->leaseheap) == NULL);\n 72 | ddsrt_mutex_destroy (&gv->leaseheap_lock);\n 73 | }\n 74 | \n 75 | struct ddsi_lease *ddsi_lease_new (ddsrt_etime_t texpire, dds_duration_t tdur, struct ddsi_entity_common *e)\n 76 | {\n 77 | struct ddsi_lease *l;\n 78 | if ((l = ddsrt_malloc (sizeof (*l))) == NULL)\n 79 | return NULL;\n 80 | EETRACE (e, \"ddsi_lease_new(tdur %\"PRId64\" guid \"PGUIDFMT\") @ %p\\n\", tdur, PGUID (e->guid), (void *) l);\n 81 | l->tdur = tdur;\n 82 | ddsrt_atomic_st64 (&l->tend, (uint64_t) texpire.v);\n 83 | l->tsched.v = TSCHED_NOT_ON_HEAP;\n 84 | l->entity = e;\n 85 | return l;\n 86 | }\n 87 | \n 88 | /**\n 89 | * Returns a clone of the provided lease. Note that this function does not use\n 90 | * locking and should therefore only be called from a context where lease 'l'\n 91 | * cannot be changed by another thread during the function call.\n 92 | */\n 93 | struct ddsi_lease *ddsi_lease_clone (const struct ddsi_lease *l)\n 94 | {\n 95 | ddsrt_etime_t texp;\n 96 | dds_duration_t tdur;\n 97 | texp.v = (int64_t) ddsrt_atomic_ld64 (&l->tend);\n 98 | tdur = l->tdur;\n 99 | return ddsi_lease_new (texp, tdur, l->entity);\n 100 | }\n 101 | \n 102 | void ddsi_lease_register (struct ddsi_lease *l) /* FIXME: make lease admin struct */\n 103 | {\n 104 | struct ddsi_domaingv * const gv = l->entity->gv;\n 105 | GVTRACE (\"ddsi_lease_register(l %p guid \"PGUIDFMT\")\\n\", (void *) l, PGUID (l->entity->guid));\n 106 | ddsrt_mutex_lock (&gv->leaseheap_lock);\n 107 | assert (l->tsched.v == TSCHED_NOT_ON_HEAP);\n 108 | int64_t tend = (int64_t) ddsrt_atomic_ld64 (&l->tend);\n 109 | if (tend != DDS_NEVER)\n 110 | {\n 111 | l->tsched.v = tend;\n 112 | ddsrt_fibheap_insert (&lease_fhdef, &gv->leaseheap, l);\n 113 | }\n 114 | ddsrt_mutex_unlock (&gv->leaseheap_lock);\n 115 | \n 116 | /* ddsi_check_and_handle_lease_expiration runs on GC thread and the only way to be sure that it wakes up in time is by forcing re-evaluation (strictly speaking only needed if this is the first lease to expire, but this operation is quite rare anyway) */\n 117 | force_lease_check (gv->gcreq_queue);\n 118 | }\n 119 | \n 120 | void ddsi_lease_unregister (struct ddsi_lease *l)\n 121 | {\n 122 | struct ddsi_domaingv * const gv = l->entity->gv;\n 123 | GVTRACE (\"ddsi_lease_unregister(l %p guid \"PGUIDFMT\")\\n\", (void *) l, PGUID (l->entity->guid));\n 124 | ddsrt_mutex_lock (&gv->leaseheap_lock);\n 125 | if (l->tsched.v != TSCHED_NOT_ON_HEAP)\n 126 | {\n 127 | ddsrt_fibheap_delete (&lease_fhdef, &gv->leaseheap, l);\n 128 | l->tsched.v = TSCHED_NOT_ON_HEAP;\n 129 | }\n 130 | ddsrt_mutex_unlock (&gv->leaseheap_lock);\n 131 | \n 132 | /* see ddsi_lease_register() */\n 133 | force_lease_check (gv->gcreq_queue);\n> 134 | }\n 135 | \n 136 | void ddsi_lease_free (struct ddsi_lease *l)\n 137 | {\n 138 | struct ddsi_domaingv * const gv = l->entity->gv;\n 139 | GVTRACE (\"ddsi_lease_free(l %p guid \"PGUIDFMT\")\\n\", (void *) l, PGUID (l->entity->guid));\n 140 | ddsrt_free (l);\n 141 | }\n 142 | \n 143 | static void trace_lease_renew (const struct ddsi_lease *l, const char *tag, ddsrt_etime_t tend_new)\n 144 | {\n 145 | struct ddsi_domaingv const * gv = l->entity->gv;\n 146 | if (gv->logconfig.c.mask & DDS_LC_TRACE)\n 147 | {\n 148 | int32_t tsec, tusec;\n 149 | GVTRACE (\" L(%s\", tag);\n 150 | if (l->entity->guid.entityid.u == DDSI_ENTITYID_PARTICIPANT)\n 151 | GVTRACE (\":%\"PRIx32, l->entity->guid.entityid.u);\n 152 | else\n 153 | GVTRACE (\"\"PGUIDFMT\"\", PGUID (l->entity->guid));\n 154 | ddsrt_etime_to_sec_usec (&tsec, &tusec, tend_new);\n 155 | GVTRACE (\" %\"PRId32\".%06\"PRId32\")\", tsec, tusec);\n 156 | }\n 157 | }\n 158 | \n 159 | void ddsi_lease_renew (struct ddsi_lease *l, ddsrt_etime_t tnowE)\n 160 | {\n 161 | ddsrt_etime_t tend_new = ddsrt_etime_add_duration (tnowE, l->tdur);\n 162 | \n 163 | /* do not touch tend if moving forward or if already expired */\n 164 | int64_t tend;\n 165 | do {\n 166 | tend = (int64_t) ddsrt_atomic_ld64 (&l->tend);\n 167 | if (tend_new.v <= tend || tnowE.v >= tend)\n 168 | return;\n 169 | } while (!ddsrt_atomic_cas64 (&l->tend, (uint64_t) tend, (uint64_t) tend_new.v));\n 170 | \n 171 | /* Only at this point we can assume that gv can be recovered from the entity in the\n 172 | * lease (i.e. the entity still exists). In cases where dereferencing l->entity->gv\n 173 | * is not safe (e.g. the deletion of entities), the early out in the loop above\n 174 | * will be the case because tend is set to DDS_NEVER. */\n 175 | trace_lease_renew (l, \"\", tend_new);\n 176 | }\n 177 | \n 178 | void ddsi_lease_set_expiry (struct ddsi_lease *l, ddsrt_etime_t when)\n 179 | {\n 180 | struct ddsi_domaingv * const gv = l->entity->gv;\n 181 | bool trigger = false;\n 182 | assert (when.v >= 0);\n 183 | ddsrt_mutex_lock (&gv->leaseheap_lock);\n 184 | /* only possible concurrent action is to move tend into the future (renew_lease),\n 185 | all other operations occur with leaseheap_lock held */\n 186 | ddsrt_atomic_st64 (&l->tend, (uint64_t) when.v);\n 187 | if (when.v < l->tsched.v)\n 188 | {\n 189 | /* moved forward and currently scheduled (by virtue of\n 190 | TSCHED_NOT_ON_HEAP == INT64_MIN) */\n 191 | l->tsched = when;\n 192 | ddsrt_fibheap_decrease_key (&lease_fhdef, &gv->leaseheap, l);\n 193 | trace_lease_renew (l, \"earlier \", when);\n 194 | trigger = true;\n 195 | }\n 196 | else if (l->tsched.v == TSCHED_NOT_ON_HEAP && when.v < DDS_NEVER)\n 197 | {\n 198 | /* not currently scheduled, with a finite new expiry time */\n 199 | l->tsched = when;\n 200 | ddsrt_fibheap_insert (&lease_fhdef, &gv->leaseheap, l);\n 201 | trace_lease_renew (l, \"insert \", when);\n 202 | trigger = true;\n 203 | }\n 204 | ddsrt_mutex_unlock (&gv->leaseheap_lock);\n 205 | \n 206 | /* see ddsi_lease_register() */\n 207 | if (trigger)\n 208 | force_lease_check (gv->gcreq_queue);\n 209 | }\n 210 | \n 211 | int64_t ddsi_check_and_handle_lease_expiration (struct ddsi_domaingv *gv, ddsrt_etime_t tnowE)\n 212 | {\n 213 | struct ddsi_lease *l;\n 214 | int64_t delay;\n 215 | ddsrt_mutex_lock (&gv->leaseheap_lock);\n 216 | while ((l = ddsrt_fibheap_min (&lease_fhdef, &gv->leaseheap)) != NULL && l->tsched.v <= tnowE.v)\n 217 | {\n 218 | ddsi_guid_t g = l->entity->guid;\n 219 | enum ddsi_entity_kind k = l->entity->kind;\n 220 | \n 221 | assert (l->tsched.v != TSCHED_NOT_ON_HEAP);\n 222 | ddsrt_fibheap_extract_min (&lease_fhdef, &gv->leaseheap);\n 223 | /* only possible concurrent action is to move tend into the future (renew_lease),\n 224 | all other operations occur with leaseheap_lock held */\n 225 | int64_t tend = (int64_t) ddsrt_atomic_ld64 (&l->tend);\n 226 | if (tnowE.v < tend)\n 227 | {\n 228 | if (tend == DDS_NEVER) {\n 229 | /* don't reinsert if it won't expire */\n 230 | l->tsched.v = TSCHED_NOT_ON_HEAP;\n 231 | } else {\n 232 | l->tsched.v = tend;\n 233 | ddsrt_fibheap_insert (&lease_fhdef, &gv->leaseheap, l);\n 234 | }", "src_commits": "[{\"path\":\"/src/cyclonedds\",\"rev\":\"3029b992768886f555dab44c6a33f40ab09cb225\",\"url\":\"https://github.com/eclipse-cyclonedds/cyclonedds\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_config_init\",\"fuzz_handle_rtps_message\",\"fuzz_handshake\",\"fuzz_sample_deser\",\"fuzz_type_object\"]", "cnt": 867, "coverage_keys": "[\"/src/cyclonedds/src/core/ddsi/src/ddsi_lease.c\"]", "target_text": "Reach line at /src/cyclonedds/src/core/ddsi/src/ddsi_lease.c:134 (observed count 867).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cyclonedds:v2026-07-test1@sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_digest": "sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cyclonedds:merged:src/cyclonedds/src/core/cdr/src/dds_cdrstream.c:648", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cyclonedds", "harness": "merged", "harness_binaries": "[\"fuzz_config_init\", \"fuzz_handle_rtps_message\", \"fuzz_handshake\", \"fuzz_sample_deser\", \"fuzz_security_deser\", \"fuzz_type_object\"]", "language": "c", "file": "/src/cyclonedds/src/core/cdr/src/dds_cdrstream.c", "line_start": 648, "line_end": 648, "line_count": 1, "function": "", "source_snippet": " 548 | ddsrt_nonnull ((1, 2, 3))\n 549 | static void dds_os_put_bytes_aligned_base (restrict_ostream_base_t *os, const struct dds_cdrstream_allocator *allocator, const void *data, uint32_t num, uint32_t elem_sz, align_t cdr_align, void **dst)\n 550 | {\n 551 | const uint32_t sz = num * elem_sz;\n 552 | dds_cdr_alignto_clear_and_resize_base (os, allocator, cdr_align, sz);\n 553 | if (dst)\n 554 | *dst = os->m_buffer + os->m_index;\n 555 | memcpy (os->m_buffer + os->m_index, data, sz);\n 556 | os->m_index += sz;\n 557 | }\n 558 | \n 559 | static inline bool is_primitive_type (enum dds_stream_typecode type)\n 560 | {\n 561 | return type <= DDS_OP_VAL_8BY || type == DDS_OP_VAL_BLN || type == DDS_OP_VAL_WCHAR;\n 562 | }\n 563 | \n 564 | static inline bool is_primitive_or_enum_type (enum dds_stream_typecode type)\n 565 | {\n 566 | return is_primitive_type (type) || type == DDS_OP_VAL_ENU;\n 567 | }\n 568 | \n 569 | static inline bool is_dheader_needed (enum dds_stream_typecode type, uint32_t xcdrv)\n 570 | {\n 571 | return !is_primitive_type (type) && xcdrv == DDSI_RTPS_CDR_ENC_VERSION_2;\n 572 | }\n 573 | \n 574 | static uint32_t get_primitive_size (enum dds_stream_typecode type)\n 575 | {\n 576 | DDSRT_STATIC_ASSERT (DDS_OP_VAL_1BY == 1 && DDS_OP_VAL_2BY == 2 && DDS_OP_VAL_4BY == 3 && DDS_OP_VAL_8BY == 4);\n 577 | assert (is_primitive_type (type));\n 578 | if (type <= DDS_OP_VAL_8BY)\n 579 | return (uint32_t)1 << ((uint32_t) type - 1);\n 580 | else if (type == DDS_OP_VAL_BLN)\n 581 | return 1;\n 582 | else if (type == DDS_OP_VAL_WCHAR)\n 583 | return 2;\n 584 | else\n 585 | abort ();\n 586 | }\n 587 | \n 588 | ddsrt_nonnull_all\n 589 | static uint32_t get_collection_elem_size (uint32_t insn, const uint32_t *ops)\n 590 | {\n 591 | switch (DDS_OP_SUBTYPE (insn))\n 592 | {\n 593 | case DDS_OP_VAL_BLN: case DDS_OP_VAL_1BY: case DDS_OP_VAL_2BY: case DDS_OP_VAL_4BY: case DDS_OP_VAL_8BY:\n 594 | return get_primitive_size (DDS_OP_SUBTYPE (insn));\n 595 | case DDS_OP_VAL_ENU:\n 596 | return sizeof (uint32_t);\n 597 | case DDS_OP_VAL_BMK:\n 598 | return DDS_OP_TYPE_SZ (insn);\n 599 | case DDS_OP_VAL_STR:\n 600 | return sizeof (char *);\n 601 | case DDS_OP_VAL_WSTR:\n 602 | return sizeof (wchar_t *);\n 603 | case DDS_OP_VAL_WCHAR:\n 604 | return sizeof (wchar_t);\n 605 | case DDS_OP_VAL_BST: case DDS_OP_VAL_BWSTR:\n 606 | case DDS_OP_VAL_SEQ: case DDS_OP_VAL_BSQ: case DDS_OP_VAL_ARR: case DDS_OP_VAL_UNI: case DDS_OP_VAL_STU:\n 607 | if (DDS_OP_TYPE (insn) == DDS_OP_VAL_ARR)\n 608 | return ops[4];\n 609 | break;\n 610 | case DDS_OP_VAL_EXT:\n 611 | break;\n 612 | }\n 613 | abort ();\n 614 | return 0u;\n 615 | }\n 616 | \n 617 | ddsrt_nonnull_all\n 618 | static uint32_t get_adr_type_size (uint32_t insn, const uint32_t *ops)\n 619 | {\n 620 | uint32_t sz = 0;\n 621 | switch (DDS_OP_TYPE (insn))\n 622 | {\n 623 | case DDS_OP_VAL_BLN: case DDS_OP_VAL_1BY: case DDS_OP_VAL_2BY: case DDS_OP_VAL_4BY: case DDS_OP_VAL_8BY:\n 624 | sz = get_primitive_size (DDS_OP_TYPE (insn));\n 625 | break;\n 626 | case DDS_OP_VAL_ENU:\n 627 | sz = sizeof (uint32_t);\n 628 | break;\n 629 | case DDS_OP_VAL_BMK:\n 630 | sz = DDS_OP_TYPE_SZ (insn);\n 631 | break;\n 632 | case DDS_OP_VAL_STR:\n 633 | sz = sizeof (char *);\n 634 | break;\n 635 | case DDS_OP_VAL_WSTR:\n 636 | sz = sizeof (wchar_t *);\n 637 | break;\n 638 | case DDS_OP_VAL_WCHAR:\n 639 | sz = sizeof (wchar_t);\n 640 | break;\n 641 | case DDS_OP_VAL_BST: case DDS_OP_VAL_BWSTR:\n 642 | sz = ops[2];\n 643 | break;\n 644 | case DDS_OP_VAL_ARR:\n 645 | {\n 646 | uint32_t num = ops[2];\n 647 | uint32_t elem_sz = get_collection_elem_size (ops[0], ops);\n> 648 | sz = num * elem_sz;\n 649 | break;\n 650 | }\n 651 | case DDS_OP_VAL_SEQ:\n 652 | case DDS_OP_VAL_BSQ:\n 653 | /* external sequence member is a pointer to a dds_sequence_t, so element size and\n 654 | sequence length are not relevant for the allocation size for the member */\n 655 | sz = sizeof (struct dds_sequence);\n 656 | break;\n 657 | case DDS_OP_VAL_EXT:\n 658 | sz = ops[3];\n 659 | break;\n 660 | case DDS_OP_VAL_UNI:\n 661 | case DDS_OP_VAL_STU:\n 662 | /* for UNI and STU members are externally defined, so are using EXT type */\n 663 | abort ();\n 664 | break;\n 665 | }\n 666 | return sz;\n 667 | }\n 668 | \n 669 | ddsrt_nonnull_all\n 670 | static uint32_t get_jeq4_type_size (const enum dds_stream_typecode valtype, const uint32_t *jeq_op)\n 671 | {\n 672 | uint32_t sz = 0;\n 673 | switch (valtype)\n 674 | {\n 675 | case DDS_OP_VAL_BLN: case DDS_OP_VAL_1BY: case DDS_OP_VAL_2BY: case DDS_OP_VAL_4BY: case DDS_OP_VAL_8BY:\n 676 | sz = get_primitive_size (valtype);\n 677 | break;\n 678 | case DDS_OP_VAL_ENU:\n 679 | sz = sizeof (uint32_t);\n 680 | break;\n 681 | case DDS_OP_VAL_STR:\n 682 | sz = sizeof (char *);\n 683 | break;\n 684 | case DDS_OP_VAL_WSTR:\n 685 | sz = sizeof (wchar_t *);\n 686 | break;\n 687 | case DDS_OP_VAL_WCHAR:\n 688 | sz = sizeof (wchar_t);\n 689 | break;\n 690 | case DDS_OP_VAL_BMK:\n 691 | case DDS_OP_VAL_BST: case DDS_OP_VAL_BWSTR:\n 692 | case DDS_OP_VAL_ARR: {\n 693 | const uint32_t *jsr_ops = jeq_op + DDS_OP_ADR_JSR (jeq_op[0]);\n 694 | sz = get_adr_type_size (jsr_ops[0], jsr_ops);\n 695 | break;\n 696 | }\n 697 | case DDS_OP_VAL_SEQ: case DDS_OP_VAL_BSQ: case DDS_OP_VAL_STU: case DDS_OP_VAL_UNI:\n 698 | sz = jeq_op[3];\n 699 | break;\n 700 | case DDS_OP_VAL_EXT:\n 701 | abort ();\n 702 | break;\n 703 | }\n 704 | return sz;\n 705 | }\n 706 | \n 707 | static bool type_has_subtype_or_members (enum dds_stream_typecode type)\n 708 | {\n 709 | return type == DDS_OP_VAL_SEQ || type == DDS_OP_VAL_BSQ || type == DDS_OP_VAL_ARR || type == DDS_OP_VAL_UNI || type == DDS_OP_VAL_STU;\n 710 | }\n 711 | \n 712 | static bool seq_is_bounded (enum dds_stream_typecode type)\n 713 | {\n 714 | assert (type == DDS_OP_VAL_SEQ || type == DDS_OP_VAL_BSQ);\n 715 | return type == DDS_OP_VAL_BSQ;\n 716 | }\n 717 | \n 718 | static inline bool bitmask_value_valid (uint32_t val_h, uint32_t val_l, uint32_t bits_h, uint32_t bits_l)\n 719 | {\n 720 | return (val_h & ~bits_h) == 0 && (val_l & ~bits_l) == 0;\n 721 | }\n 722 | \n 723 | static inline bool op_type_external (const uint32_t insn)\n 724 | {\n 725 | uint32_t typeflags = DDS_OP_TYPE_FLAGS (insn);\n 726 | return (typeflags & DDS_OP_FLAG_EXT);\n 727 | }\n 728 | \n 729 | static inline bool op_type_optional (const uint32_t insn)\n 730 | {\n 731 | uint32_t flags = DDS_OP_FLAGS (insn);\n 732 | return (flags & DDS_OP_FLAG_OPT);\n 733 | }\n 734 | \n 735 | static inline bool op_type_base (const uint32_t insn)\n 736 | {\n 737 | uint32_t opflags = DDS_OP_FLAGS (insn);\n 738 | return (opflags & DDS_OP_FLAG_BASE);\n 739 | }\n 740 | \n 741 | ddsrt_nonnull_all\n 742 | static inline bool check_optimize_impl (uint32_t xcdr_version, const uint32_t *ops, uint32_t size, uint32_t num, uint32_t *off, uint32_t member_offs)\n 743 | {\n 744 | align_t cdr_align = dds_cdr_get_align (xcdr_version, size);\n 745 | if (*off % ALIGN(cdr_align))\n 746 | *off += ALIGN(cdr_align) - (*off % ALIGN(cdr_align));\n 747 | if (member_offs + ops[1] != *off)\n 748 | return false;", "src_commits": "[{\"path\":\"/src/cyclonedds\",\"rev\":\"3029b992768886f555dab44c6a33f40ab09cb225\",\"url\":\"https://github.com/eclipse-cyclonedds/cyclonedds\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_config_init\",\"fuzz_handle_rtps_message\",\"fuzz_handshake\",\"fuzz_sample_deser\",\"fuzz_type_object\"]", "cnt": 178, "coverage_keys": "[\"/src/cyclonedds/src/core/cdr/src/dds_cdrstream.c\"]", "target_text": "Reach line at /src/cyclonedds/src/core/cdr/src/dds_cdrstream.c:648 (observed count 178).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cyclonedds:v2026-07-test1@sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_digest": "sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cyclonedds:merged:src/cyclonedds/src/core/ddsi/src/ddsi_endpoint.c:378", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cyclonedds", "harness": "merged", "harness_binaries": "[\"fuzz_config_init\", \"fuzz_handle_rtps_message\", \"fuzz_handshake\", \"fuzz_sample_deser\", \"fuzz_security_deser\", \"fuzz_type_object\"]", "language": "c", "file": "/src/cyclonedds/src/core/ddsi/src/ddsi_endpoint.c", "line_start": 378, "line_end": 378, "line_count": 1, "function": "", "source_snippet": " 278 | } else if (delta > 0) {\n 279 | data.extra = (uint32_t) DDSI_LIVELINESS_CHANGED_NOT_ALIVE_TO_ALIVE;\n 280 | (rd->status_cb) (rd->status_cb_entity, &data);\n 281 | } else {\n 282 | /* Twitch: the resulting (proxy)writer state is unchanged, but there has been\n 283 | a transition to another state and back to the current state. So we'll call\n 284 | the callback twice in this case. */\n 285 | static const enum ddsi_liveliness_changed_data_extra x[] = {\n 286 | DDSI_LIVELINESS_CHANGED_NOT_ALIVE_TO_ALIVE,\n 287 | DDSI_LIVELINESS_CHANGED_ALIVE_TO_NOT_ALIVE\n 288 | };\n 289 | data.extra = (uint32_t) x[alive_state->alive];\n 290 | (rd->status_cb) (rd->status_cb_entity, &data);\n 291 | data.extra = (uint32_t) x[!alive_state->alive];\n 292 | (rd->status_cb) (rd->status_cb_entity, &data);\n 293 | }\n 294 | }\n 295 | }\n 296 | \n 297 | void ddsi_reader_update_notify_wr_alive_state (struct ddsi_reader *rd, const struct ddsi_writer *wr, const struct ddsi_alive_state *alive_state)\n 298 | {\n 299 | struct ddsi_rd_wr_match *m;\n 300 | bool notify = false;\n 301 | int delta = 0; /* -1: alive -> not_alive; 0: unchanged; 1: not_alive -> alive */\n 302 | ddsrt_mutex_lock (&rd->e.lock);\n 303 | if ((m = ddsrt_avl_lookup (&ddsi_rd_local_writers_treedef, &rd->local_writers, &wr->e.guid)) != NULL)\n 304 | {\n 305 | if ((int32_t) (alive_state->vclock - m->wr_alive_vclock) > 0)\n 306 | {\n 307 | delta = (int) alive_state->alive - (int) m->wr_alive;\n 308 | notify = true;\n 309 | m->wr_alive = alive_state->alive;\n 310 | m->wr_alive_vclock = alive_state->vclock;\n 311 | }\n 312 | }\n 313 | ddsrt_mutex_unlock (&rd->e.lock);\n 314 | \n 315 | if (delta < 0 && rd->rhc)\n 316 | {\n 317 | struct ddsi_writer_info wrinfo;\n 318 | ddsi_make_writer_info (&wrinfo, &wr->e, wr->xqos, DDSI_STATUSINFO_UNREGISTER);\n 319 | ddsi_rhc_unregister_wr (rd->rhc, &wrinfo);\n 320 | }\n 321 | \n 322 | reader_update_notify_alive_state_invoke_cb (rd, wr->e.iid, notify, delta, alive_state);\n 323 | }\n 324 | \n 325 | static void ddsi_reader_update_notify_wr_alive_state_guid (const struct ddsi_guid *rd_guid, const struct ddsi_writer *wr, const struct ddsi_alive_state *alive_state)\n 326 | {\n 327 | struct ddsi_reader *rd;\n 328 | if ((rd = ddsi_entidx_lookup_reader_guid (wr->e.gv->entity_index, rd_guid)) != NULL)\n 329 | ddsi_reader_update_notify_wr_alive_state (rd, wr, alive_state);\n 330 | }\n 331 | \n 332 | void ddsi_reader_update_notify_pwr_alive_state (struct ddsi_reader *rd, const struct ddsi_proxy_writer *pwr, const struct ddsi_alive_state *alive_state)\n 333 | {\n 334 | struct ddsi_rd_pwr_match *m;\n 335 | bool notify = false;\n 336 | int delta = 0; /* -1: alive -> not_alive; 0: unchanged; 1: not_alive -> alive */\n 337 | ddsrt_mutex_lock (&rd->e.lock);\n 338 | if ((m = ddsrt_avl_lookup (&ddsi_rd_writers_treedef, &rd->writers, &pwr->e.guid)) != NULL)\n 339 | {\n 340 | if ((int32_t) (alive_state->vclock - m->pwr_alive_vclock) > 0)\n 341 | {\n 342 | delta = (int) alive_state->alive - (int) m->pwr_alive;\n 343 | notify = true;\n 344 | m->pwr_alive = alive_state->alive;\n 345 | m->pwr_alive_vclock = alive_state->vclock;\n 346 | }\n 347 | }\n 348 | ddsrt_mutex_unlock (&rd->e.lock);\n 349 | \n 350 | if (delta < 0 && rd->rhc)\n 351 | {\n 352 | struct ddsi_writer_info wrinfo;\n 353 | ddsi_make_writer_info (&wrinfo, &pwr->e, pwr->c.xqos, DDSI_STATUSINFO_UNREGISTER);\n 354 | ddsi_rhc_unregister_wr (rd->rhc, &wrinfo);\n 355 | }\n 356 | \n 357 | reader_update_notify_alive_state_invoke_cb (rd, pwr->e.iid, notify, delta, alive_state);\n 358 | }\n 359 | \n 360 | void ddsi_reader_update_notify_pwr_alive_state_guid (const struct ddsi_guid *rd_guid, const struct ddsi_proxy_writer *pwr, const struct ddsi_alive_state *alive_state)\n 361 | {\n 362 | struct ddsi_reader *rd;\n 363 | if ((rd = ddsi_entidx_lookup_reader_guid (pwr->e.gv->entity_index, rd_guid)) != NULL)\n 364 | ddsi_reader_update_notify_pwr_alive_state (rd, pwr, alive_state);\n 365 | }\n 366 | \n 367 | void ddsi_update_reader_init_acknack_count (const ddsrt_log_cfg_t *logcfg, const struct ddsi_entity_index *entidx, const struct ddsi_guid *rd_guid, ddsi_count_t count)\n 368 | {\n 369 | struct ddsi_reader *rd;\n 370 | \n 371 | /* Update the initial acknack sequence number for the reader. See\n 372 | also ddsi_reader_add_connection(). */\n 373 | DDS_CLOG (DDS_LC_DISCOVERY, logcfg, \"ddsi_update_reader_init_acknack_count (\"PGUIDFMT\", %\"PRIu32\"): \", PGUID (*rd_guid), count);\n 374 | if ((rd = ddsi_entidx_lookup_reader_guid (entidx, rd_guid)) != NULL)\n 375 | {\n 376 | ddsrt_mutex_lock (&rd->e.lock);\n 377 | DDS_CLOG (DDS_LC_DISCOVERY, logcfg, \"%\"PRIu32\" -> \", rd->init_acknack_count);\n> 378 | if (count > rd->init_acknack_count)\n 379 | rd->init_acknack_count = count;\n 380 | DDS_CLOG (DDS_LC_DISCOVERY, logcfg, \"%\"PRIu32\"\\n\", count);\n 381 | ddsrt_mutex_unlock (&rd->e.lock);\n 382 | }\n 383 | else\n 384 | {\n 385 | DDS_CLOG (DDS_LC_DISCOVERY, logcfg, \"reader no longer exists\\n\");\n 386 | }\n 387 | }\n 388 | \n 389 | void ddsi_deliver_historical_data (const struct ddsi_writer *wr, const struct ddsi_reader *rd)\n 390 | {\n 391 | struct ddsi_domaingv * const gv = wr->e.gv;\n 392 | struct ddsi_tkmap * const tkmap = gv->m_tkmap;\n 393 | struct ddsi_whc_sample_iter it;\n 394 | struct ddsi_whc_borrowed_sample sample;\n 395 | /* FIXME: should limit ourselves to what it is available because of durability history, not writer history */\n 396 | ddsi_whc_sample_iter_init (wr->whc, &it);\n 397 | while (ddsi_whc_sample_iter_borrow_next (&it, &sample))\n 398 | {\n 399 | struct ddsi_serdata *payload;\n 400 | if ((payload = ddsi_serdata_ref_as_type (rd->type, sample.serdata)) == NULL)\n 401 | {\n 402 | GVWARNING (\"local: deserialization of %s/%s as %s/%s failed in topic type conversion\\n\",\n 403 | wr->xqos->topic_name, wr->type->type_name, rd->xqos->topic_name, rd->type->type_name);\n 404 | }\n 405 | else\n 406 | {\n 407 | struct ddsi_writer_info wrinfo;\n 408 | struct ddsi_tkmap_instance *tk = ddsi_tkmap_lookup_instance_ref (tkmap, payload);\n 409 | ddsi_make_writer_info (&wrinfo, &wr->e, wr->xqos, payload->statusinfo);\n 410 | (void) ddsi_rhc_store (rd->rhc, &wrinfo, payload, tk);\n 411 | ddsi_tkmap_instance_unref (tkmap, tk);\n 412 | ddsi_serdata_unref (payload);\n 413 | }\n 414 | }\n 415 | }\n 416 | \n 417 | static void new_reader_writer_common (const struct ddsrt_log_cfg *logcfg, const struct ddsi_guid *guid, const char *topic_name, const char *type_name, const struct dds_qos *xqos)\n 418 | {\n 419 | const char *partition = \"(default)\";\n 420 | const char *partition_suffix = \"\";\n 421 | assert (topic_name != NULL);\n 422 | assert (type_name != NULL);\n 423 | if (ddsi_is_builtin_entityid (guid->entityid, DDSI_VENDORID_ECLIPSE))\n 424 | {\n 425 | /* continue printing it as not being in a partition, the actual\n 426 | value doesn't matter because it is never matched based on QoS\n 427 | settings */\n 428 | partition = \"(null)\";\n 429 | }\n 430 | else if ((xqos->present & DDSI_QP_PARTITION) && xqos->partition.n > 0 && strcmp (xqos->partition.strs[0], \"\") != 0)\n 431 | {\n 432 | partition = xqos->partition.strs[0];\n 433 | if (xqos->partition.n > 1)\n 434 | partition_suffix = \"+\";\n 435 | }\n 436 | DDS_CLOG (DDS_LC_DISCOVERY, logcfg, \"new_%s(guid \"PGUIDFMT\", %s%s.%s/%s)\\n\",\n 437 | ddsi_is_writer_entityid (guid->entityid) ? \"writer\" : \"reader\",\n 438 | PGUID (*guid),\n 439 | partition, partition_suffix,\n 440 | topic_name,\n 441 | type_name);\n 442 | }\n 443 | \n 444 | static bool is_onlylocal_endpoint (struct ddsi_participant *pp, const char *topic_name, const struct ddsi_sertype *type, const struct dds_qos *xqos)\n 445 | {\n 446 | if (ddsi_builtintopic_is_builtintopic (pp->e.gv->builtin_topic_interface, type))\n 447 | return true;\n 448 | #ifdef DDS_HAS_NETWORK_PARTITIONS\n 449 | if (ddsi_is_ignored_nwpart (pp->e.gv, xqos, topic_name))\n 450 | return true;\n 451 | #endif\n 452 | return false;\n 453 | }\n 454 | \n 455 | static void endpoint_common_init (struct ddsi_entity_common *e, struct ddsi_endpoint_common *c, struct ddsi_domaingv *gv, enum ddsi_entity_kind kind, const struct ddsi_guid *guid, const struct ddsi_guid *group_guid, struct ddsi_participant *pp, bool onlylocal, const struct ddsi_sertype *sertype, struct ddsi_psmx_locators_set *psmx_locators)\n 456 | {\n 457 | #ifndef DDS_HAS_TYPELIB\n 458 | DDSRT_UNUSED_ARG (sertype);\n 459 | #endif\n 460 | ddsi_entity_common_init (e, gv, guid, kind, ddsrt_time_wallclock (), DDSI_VENDORID_ECLIPSE, pp->e.onlylocal || onlylocal);\n 461 | c->pp = ddsi_ref_participant (pp, &e->guid);\n 462 | if (group_guid)\n 463 | c->group_guid = *group_guid;\n 464 | else\n 465 | memset (&c->group_guid, 0, sizeof (c->group_guid));\n 466 | \n 467 | if (psmx_locators)\n 468 | {\n 469 | c->psmx_locators.length = psmx_locators->length;\n 470 | if (psmx_locators->length > 0)\n 471 | c->psmx_locators.locators = ddsrt_memdup (psmx_locators->locators, psmx_locators->length * sizeof (*psmx_locators->locators));\n 472 | }\n 473 | else\n 474 | {\n 475 | c->psmx_locators.length = 0;\n 476 | }\n 477 | \n 478 | #ifdef DDS_HAS_TYPELIB", "src_commits": "[{\"path\":\"/src/cyclonedds\",\"rev\":\"3029b992768886f555dab44c6a33f40ab09cb225\",\"url\":\"https://github.com/eclipse-cyclonedds/cyclonedds\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_config_init\",\"fuzz_handle_rtps_message\",\"fuzz_handshake\",\"fuzz_sample_deser\",\"fuzz_type_object\"]", "cnt": 867, "coverage_keys": "[\"/src/cyclonedds/src/core/ddsi/src/ddsi_endpoint.c\"]", "target_text": "Reach line at /src/cyclonedds/src/core/ddsi/src/ddsi_endpoint.c:378 (observed count 867).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cyclonedds:v2026-07-test1@sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_digest": "sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "cyclonedds:merged:src/cyclonedds/src/core/ddsi/src/ddsi_typewrap.c:1195", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "cyclonedds", "harness": "merged", "harness_binaries": "[\"fuzz_config_init\", \"fuzz_handle_rtps_message\", \"fuzz_handshake\", \"fuzz_sample_deser\", \"fuzz_security_deser\", \"fuzz_type_object\"]", "language": "c", "file": "/src/cyclonedds/src/core/ddsi/src/ddsi_typewrap.c", "line_start": 1195, "line_end": 1195, "line_count": 1, "function": "", "source_snippet": " 1095 | return ret;\n 1096 | break;\n 1097 | case DDS_XTypes_TK_MAP:\n 1098 | if ((ret = xt_valid_type_flags (gv, t->_u.map.c.flags, t->_d))\n 1099 | || (ret = xt_valid_member_flags (gv, t->_u.map.c.element_flags, MEMBER_FLAG_COLLECTION_ELEMENT, in_key))\n 1100 | || (ret = xt_validate_impl (gv, &t->_u.map.key_type->xt, false, in_key))\n 1101 | || (ret = xt_validate_impl (gv, &t->_u.map.c.element_type->xt, false, in_key)))\n 1102 | return ret;\n 1103 | break;\n 1104 | case DDS_XTypes_TK_BOOLEAN: case DDS_XTypes_TK_BYTE:\n 1105 | case DDS_XTypes_TK_INT8: case DDS_XTypes_TK_INT16: case DDS_XTypes_TK_INT32: case DDS_XTypes_TK_INT64:\n 1106 | case DDS_XTypes_TK_UINT8: case DDS_XTypes_TK_UINT16: case DDS_XTypes_TK_UINT32: case DDS_XTypes_TK_UINT64:\n 1107 | case DDS_XTypes_TK_FLOAT32: case DDS_XTypes_TK_FLOAT64: case DDS_XTypes_TK_FLOAT128:\n 1108 | case DDS_XTypes_TK_CHAR8: case DDS_XTypes_TK_CHAR16: case DDS_XTypes_TK_STRING8: case DDS_XTypes_TK_STRING16:\n 1109 | // no validations\n 1110 | break;\n 1111 | default:\n 1112 | return DDS_RETCODE_UNSUPPORTED;\n 1113 | }\n 1114 | return DDS_RETCODE_OK;\n 1115 | }\n 1116 | \n 1117 | dds_return_t ddsi_xt_validate (struct ddsi_domaingv *gv, const struct xt_type *t)\n 1118 | {\n 1119 | return xt_validate_impl (gv, t, true, false);\n 1120 | }\n 1121 | \n 1122 | static dds_return_t add_minimal_typeobj (struct ddsi_domaingv *gv, struct xt_type *xt, const struct DDS_XTypes_TypeObject *to)\n 1123 | {\n 1124 | const struct DDS_XTypes_MinimalTypeObject *mto = &to->_u.minimal;\n 1125 | dds_return_t ret = DDS_RETCODE_OK;\n 1126 | if (!xt->_d)\n 1127 | xt->_d = mto->_d;\n 1128 | else if (xt->_d != mto->_d)\n 1129 | {\n 1130 | GVTRACE (\"typeobject has invalid type kind\\n\");\n 1131 | ret = DDS_RETCODE_BAD_PARAMETER;\n 1132 | goto err_tk;\n 1133 | }\n 1134 | switch (mto->_d)\n 1135 | {\n 1136 | case DDS_XTypes_TK_ALIAS:\n 1137 | xt->_u.alias.flags = mto->_u.alias_type.alias_flags;\n 1138 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.alias.related_type, &mto->_u.alias_type.body.common.related_type)) != DDS_RETCODE_OK)\n 1139 | goto err_to;\n 1140 | xt->_u.alias.related_flags = mto->_u.alias_type.body.common.related_flags;\n 1141 | break;\n 1142 | case DDS_XTypes_TK_ANNOTATION:\n 1143 | ret = DDS_RETCODE_UNSUPPORTED; /* FIXME: not implemented */\n 1144 | goto err_to;\n 1145 | case DDS_XTypes_TK_STRUCTURE:\n 1146 | xt->_u.structure.flags = mto->_u.struct_type.struct_flags;\n 1147 | if (mto->_u.struct_type.header.base_type._d)\n 1148 | {\n 1149 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.structure.base_type, &mto->_u.struct_type.header.base_type)) != DDS_RETCODE_OK)\n 1150 | goto err_to;\n 1151 | }\n 1152 | else\n 1153 | xt->_u.structure.base_type = NULL;\n 1154 | xt->_u.structure.members.length = mto->_u.struct_type.member_seq._length;\n 1155 | xt->_u.structure.members.seq = ddsrt_calloc (xt->_u.structure.members.length, sizeof (*xt->_u.structure.members.seq));\n 1156 | for (uint32_t n = 0; n < xt->_u.structure.members.length; n++)\n 1157 | {\n 1158 | xt->_u.structure.members.seq[n].id = mto->_u.struct_type.member_seq._buffer[n].common.member_id;\n 1159 | xt->_u.structure.members.seq[n].flags = mto->_u.struct_type.member_seq._buffer[n].common.member_flags;\n 1160 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.structure.members.seq[n].type, &mto->_u.struct_type.member_seq._buffer[n].common.member_type_id)) != DDS_RETCODE_OK)\n 1161 | {\n 1162 | for (uint32_t m = 0; m < n; m++)\n 1163 | ddsi_type_unref_locked (gv, xt->_u.structure.members.seq[m].type);\n 1164 | if (xt->_u.structure.base_type)\n 1165 | ddsi_type_unref_locked (gv, xt->_u.structure.base_type);\n 1166 | ddsrt_free (xt->_u.structure.members.seq);\n 1167 | goto err_to;\n 1168 | }\n 1169 | memcpy (xt->_u.structure.members.seq[n].detail.name_hash, mto->_u.struct_type.member_seq._buffer[n].detail.name_hash,\n 1170 | sizeof (xt->_u.structure.members.seq[n].detail.name_hash));\n 1171 | }\n 1172 | break;\n 1173 | case DDS_XTypes_TK_UNION:\n 1174 | xt->_u.union_type.flags = mto->_u.union_type.union_flags;\n 1175 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.union_type.disc_type, &mto->_u.union_type.discriminator.common.type_id)) != DDS_RETCODE_OK)\n 1176 | goto err_to;\n 1177 | xt->_u.union_type.disc_flags = mto->_u.union_type.discriminator.common.member_flags;\n 1178 | xt->_u.union_type.members.length = mto->_u.union_type.member_seq._length;\n 1179 | xt->_u.union_type.members.seq = ddsrt_calloc (xt->_u.union_type.members.length, sizeof (*xt->_u.union_type.members.seq));\n 1180 | for (uint32_t n = 0; n < xt->_u.union_type.members.length; n++)\n 1181 | {\n 1182 | xt->_u.union_type.members.seq[n].id = mto->_u.union_type.member_seq._buffer[n].common.member_id;\n 1183 | xt->_u.union_type.members.seq[n].flags = mto->_u.union_type.member_seq._buffer[n].common.member_flags;\n 1184 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.union_type.members.seq[n].type, &mto->_u.union_type.member_seq._buffer[n].common.type_id)) != DDS_RETCODE_OK)\n 1185 | {\n 1186 | for (uint32_t m = 0; m < n; m++)\n 1187 | {\n 1188 | ddsi_type_unref_locked (gv, xt->_u.union_type.members.seq[m].type);\n 1189 | ddsrt_free (xt->_u.union_type.members.seq[m].label_seq._buffer);\n 1190 | }\n 1191 | ddsi_type_unref_locked (gv, xt->_u.union_type.disc_type);\n 1192 | ddsrt_free (xt->_u.union_type.members.seq);\n 1193 | goto err_to;\n 1194 | }\n> 1195 | xt->_u.union_type.members.seq[n].label_seq._length = mto->_u.union_type.member_seq._buffer[n].common.label_seq._length;\n 1196 | if (xt->_u.union_type.members.seq[n].label_seq._length > 0) {\n 1197 | xt->_u.union_type.members.seq[n].label_seq._buffer =\n 1198 | ddsrt_memdup (mto->_u.union_type.member_seq._buffer[n].common.label_seq._buffer,\n 1199 | mto->_u.union_type.member_seq._buffer[n].common.label_seq._length * sizeof (*mto->_u.union_type.member_seq._buffer[n].common.label_seq._buffer));\n 1200 | xt->_u.union_type.members.seq[n].label_seq._release = true;\n 1201 | } else {\n 1202 | xt->_u.union_type.members.seq[n].label_seq._buffer = NULL;\n 1203 | xt->_u.union_type.members.seq[n].label_seq._release = false;\n 1204 | }\n 1205 | memcpy (xt->_u.union_type.members.seq[n].detail.name_hash, mto->_u.union_type.member_seq._buffer[n].detail.name_hash,\n 1206 | sizeof (xt->_u.union_type.members.seq[n].detail.name_hash));\n 1207 | }\n 1208 | break;\n 1209 | case DDS_XTypes_TK_BITSET:\n 1210 | xt->_u.bitset.flags = mto->_u.bitset_type.bitset_flags;\n 1211 | xt->_u.bitset.fields.length = mto->_u.bitset_type.field_seq._length;\n 1212 | xt->_u.bitset.fields.seq = ddsrt_calloc (xt->_u.bitset.fields.length, sizeof (*xt->_u.bitset.fields.seq));\n 1213 | for (uint32_t n = 0; n < xt->_u.bitset.fields.length; n++)\n 1214 | {\n 1215 | xt->_u.bitset.fields.seq[n].position = mto->_u.bitset_type.field_seq._buffer[n].common.position;\n 1216 | xt->_u.bitset.fields.seq[n].flags = mto->_u.bitset_type.field_seq._buffer[n].common.flags;\n 1217 | xt->_u.bitset.fields.seq[n].bitcount = mto->_u.bitset_type.field_seq._buffer[n].common.bitcount;\n 1218 | xt->_u.bitset.fields.seq[n].holder_type = mto->_u.bitset_type.field_seq._buffer[n].common.holder_type;\n 1219 | xt->_u.bitset.fields.seq[n].flags = mto->_u.bitset_type.field_seq._buffer[n].common.flags;\n 1220 | memcpy (xt->_u.bitset.fields.seq[n].detail.name_hash, mto->_u.bitset_type.field_seq._buffer[n].name_hash,\n 1221 | sizeof (xt->_u.bitset.fields.seq[n].detail.name_hash));\n 1222 | }\n 1223 | break;\n 1224 | case DDS_XTypes_TK_SEQUENCE:\n 1225 | xt->_u.seq.c.flags = mto->_u.sequence_type.collection_flag;\n 1226 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.seq.c.element_type, &mto->_u.sequence_type.element.common.type)) != DDS_RETCODE_OK)\n 1227 | goto err_to;\n 1228 | xt->_u.seq.c.element_flags = mto->_u.sequence_type.element.common.element_flags;\n 1229 | xt->_u.seq.bound = mto->_u.sequence_type.header.common.bound;\n 1230 | break;\n 1231 | case DDS_XTypes_TK_ARRAY:\n 1232 | xt->_u.array.c.flags = mto->_u.array_type.collection_flag;\n 1233 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.array.c.element_type, &mto->_u.array_type.element.common.type)) != DDS_RETCODE_OK)\n 1234 | goto err_to;\n 1235 | xt->_u.array.c.element_flags = mto->_u.array_type.element.common.element_flags;\n 1236 | xt_lbounds_dup (&xt->_u.array.bounds, &mto->_u.array_type.header.common.bound_seq);\n 1237 | break;\n 1238 | case DDS_XTypes_TK_MAP:\n 1239 | xt->_u.map.c.flags = mto->_u.map_type.collection_flag;\n 1240 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.map.c.element_type, &mto->_u.map_type.element.common.type)) != DDS_RETCODE_OK)\n 1241 | goto err_to;\n 1242 | xt->_u.map.c.element_flags = mto->_u.map_type.element.common.element_flags;\n 1243 | if ((ret = ddsi_type_register_dep (gv, &xt->id, &xt->_u.map.key_type, &mto->_u.map_type.key.common.type)) != DDS_RETCODE_OK)\n 1244 | {\n 1245 | ddsi_type_unref_locked (gv, xt->_u.map.c.element_type);\n 1246 | goto err_to;\n 1247 | }\n 1248 | xt->_u.map.bound = mto->_u.map_type.header.common.bound;\n 1249 | break;\n 1250 | case DDS_XTypes_TK_ENUM:\n 1251 | xt->_u.enum_type.flags = mto->_u.enumerated_type.enum_flags;\n 1252 | xt->_u.enum_type.bit_bound = mto->_u.enumerated_type.header.common.bit_bound;\n 1253 | xt->_u.enum_type.literals.length = mto->_u.enumerated_type.literal_seq._length;\n 1254 | xt->_u.enum_type.literals.seq = ddsrt_calloc (xt->_u.enum_type.literals.length, sizeof (*xt->_u.enum_type.literals.seq));\n 1255 | for (uint32_t n = 0; n < xt->_u.enum_type.literals.length; n++)\n 1256 | {\n 1257 | xt->_u.enum_type.literals.seq[n].value = mto->_u.enumerated_type.literal_seq._buffer[n].common.value;\n 1258 | xt->_u.enum_type.literals.seq[n].flags = mto->_u.enumerated_type.literal_seq._buffer[n].common.flags;\n 1259 | memcpy (xt->_u.enum_type.literals.seq[n].detail.name_hash, mto->_u.enumerated_type.literal_seq._buffer[n].detail.name_hash,\n 1260 | sizeof (xt->_u.enum_type.literals.seq[n].detail.name_hash));\n 1261 | }\n 1262 | break;\n 1263 | case DDS_XTypes_TK_BITMASK:\n 1264 | xt->_u.bitmask.flags = mto->_u.bitmask_type.bitmask_flags;\n 1265 | xt->_u.bitmask.bit_bound = mto->_u.bitmask_type.header.common.bit_bound;\n 1266 | xt->_u.bitmask.bitflags.length = mto->_u.bitmask_type.flag_seq._length;\n 1267 | xt->_u.bitmask.bitflags.seq = ddsrt_calloc (xt->_u.bitmask.bitflags.length, sizeof (*xt->_u.bitmask.bitflags.seq));\n 1268 | for (uint32_t n = 0; n < xt->_u.bitmask.bitflags.length; n++)\n 1269 | {\n 1270 | xt->_u.bitmask.bitflags.seq[n].position = mto->_u.bitmask_type.flag_seq._buffer[n].common.position;\n 1271 | xt->_u.bitmask.bitflags.seq[n].flags = mto->_u.bitmask_type.flag_seq._buffer[n].common.flags;\n 1272 | memcpy (xt->_u.bitmask.bitflags.seq[n].detail.name_hash, mto->_u.bitmask_type.flag_seq._buffer[n].detail.name_hash,\n 1273 | sizeof (xt->_u.bitmask.bitflags.seq[n].detail.name_hash));\n 1274 | }\n 1275 | break;\n 1276 | default:\n 1277 | ret = DDS_RETCODE_UNSUPPORTED; /* not supported */\n 1278 | goto err_tk;\n 1279 | }\n 1280 | return ret;\n 1281 | \n 1282 | err_tk:\n 1283 | err_to:\n 1284 | xt->_d = DDS_XTypes_TK_NONE;\n 1285 | return ret;\n 1286 | }\n 1287 | \n 1288 | static dds_return_t add_complete_typeobj (struct ddsi_domaingv *gv, struct xt_type *xt, const struct DDS_XTypes_TypeObject *to)\n 1289 | {\n 1290 | const struct DDS_XTypes_CompleteTypeObject *cto = &to->_u.complete;\n 1291 | dds_return_t ret = DDS_RETCODE_OK;\n 1292 | if (!xt->_d)\n 1293 | xt->_d = cto->_d;\n 1294 | else if (xt->_d != cto->_d)\n 1295 | {", "src_commits": "[{\"path\":\"/src/cyclonedds\",\"rev\":\"3029b992768886f555dab44c6a33f40ab09cb225\",\"url\":\"https://github.com/eclipse-cyclonedds/cyclonedds\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_config_init\",\"fuzz_handle_rtps_message\",\"fuzz_handshake\",\"fuzz_sample_deser\",\"fuzz_type_object\"]", "cnt": 90, "coverage_keys": "[\"/src/cyclonedds/src/core/ddsi/src/ddsi_typewrap.c\"]", "target_text": "Reach line at /src/cyclonedds/src/core/ddsi/src/ddsi_typewrap.c:1195 (observed count 90).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-cyclonedds:v2026-07-test1@sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_digest": "sha256:ebce3ee4f0439dc4137e4102d12d1b0958882af2e519a441e1203be06da72dfd", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "hdf5:merged:src/hdf5/src/H5T.c:7217", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "hdf5", "harness": "merged", "harness_binaries": "[\"h5_extended_fuzzer\", \"h5_read_fuzzer\"]", "language": "c", "file": "/src/hdf5/src/H5T.c", "line_start": 7217, "line_end": 7217, "line_count": 1, "function": "", "source_snippet": " 7117 | if (H5T__detect_vlen_ref(dt->shared->u.compnd.memb[u].type))\n 7118 | HGOTO_DONE(true);\n 7119 | break;\n 7120 | \n 7121 | case H5T_ARRAY:\n 7122 | case H5T_VLEN:\n 7123 | case H5T_ENUM:\n 7124 | HGOTO_DONE(H5T__detect_vlen_ref(dt->shared->parent));\n 7125 | break;\n 7126 | \n 7127 | case H5T_NO_CLASS:\n 7128 | case H5T_INTEGER:\n 7129 | case H5T_FLOAT:\n 7130 | case H5T_TIME:\n 7131 | case H5T_STRING:\n 7132 | case H5T_BITFIELD:\n 7133 | case H5T_OPAQUE:\n 7134 | case H5T_REFERENCE:\n 7135 | case H5T_COMPLEX:\n 7136 | case H5T_NCLASSES:\n 7137 | default:\n 7138 | break;\n 7139 | } /* end if */\n 7140 | \n 7141 | done:\n 7142 | FUNC_LEAVE_NOAPI(ret_value)\n 7143 | } /* end H5T__detect_vlen_ref() */\n 7144 | \n 7145 | /*-------------------------------------------------------------------------\n 7146 | * Function: H5T_is_vl_storage\n 7147 | *\n 7148 | * Purpose: Check if a datatype will be stored in a variable-length form.\n 7149 | *\n 7150 | * Notes: Currently, only variable-length string & sequences and region\n 7151 | * references are stored in a variable-length form.\n 7152 | *\n 7153 | * Return:\n 7154 | * One of two values on success:\n 7155 | * true - If the datatype will be stored in a variable-length form\n 7156 | * false - If the datatype will NOT be stored in a variable-length form\n 7157 | * <0 is returned on failure\n 7158 | *\n 7159 | *-------------------------------------------------------------------------\n 7160 | */\n 7161 | htri_t\n 7162 | H5T_is_vl_storage(const H5T_t *dt)\n 7163 | {\n 7164 | htri_t ret_value = false;\n 7165 | \n 7166 | FUNC_ENTER_NOAPI(FAIL)\n 7167 | \n 7168 | /* Sanity check */\n 7169 | assert(dt);\n 7170 | \n 7171 | /* VL and region reference datatypes are stored in variable-length form */\n 7172 | if (H5T_detect_class(dt, H5T_VLEN, false))\n 7173 | ret_value = true;\n 7174 | else if (H5T_detect_class(dt, H5T_REFERENCE, false))\n 7175 | ret_value = H5T__detect_vlen_ref(dt);\n 7176 | else\n 7177 | ret_value = false;\n 7178 | \n 7179 | done:\n 7180 | FUNC_LEAVE_NOAPI(ret_value)\n 7181 | } /* end H5T_is_vl_storage() */\n 7182 | \n 7183 | /*-------------------------------------------------------------------------\n 7184 | * Function: H5T__upgrade_version_cb\n 7185 | *\n 7186 | * Purpose: H5T__visit callback to Upgrade the version of a datatype\n 7187 | * (if there's any benefit to doing so)\n 7188 | *\n 7189 | * Note: The behavior below is tightly coupled with the \"better\"\n 7190 | * encodings for datatype messages in the datatype message\n 7191 | * encoding routine.\n 7192 | *\n 7193 | * Return: Non-negative on success/Negative on failure\n 7194 | *\n 7195 | *-------------------------------------------------------------------------\n 7196 | */\n 7197 | static herr_t\n 7198 | H5T__upgrade_version_cb(H5T_t *dt, void *op_value)\n 7199 | {\n 7200 | FUNC_ENTER_PACKAGE_NOERR\n 7201 | \n 7202 | /* Sanity check */\n 7203 | assert(dt);\n 7204 | assert(op_value);\n 7205 | \n 7206 | /* Special behavior for each type of datatype */\n 7207 | switch (dt->shared->type) {\n 7208 | case H5T_COMPOUND:\n 7209 | case H5T_ARRAY:\n 7210 | case H5T_ENUM:\n 7211 | /* These types benefit from \"upgrading\" their version */\n 7212 | if (*(unsigned *)op_value > dt->shared->version)\n 7213 | dt->shared->version = *(unsigned *)op_value;\n 7214 | break;\n 7215 | \n 7216 | case H5T_VLEN:\n> 7217 | if (dt->shared->parent->shared->version > dt->shared->version)\n 7218 | dt->shared->version = dt->shared->parent->shared->version;\n 7219 | break;\n 7220 | \n 7221 | case H5T_COMPLEX:\n 7222 | if (dt->shared->parent->shared->version > dt->shared->version)\n 7223 | dt->shared->version = dt->shared->parent->shared->version;\n 7224 | break;\n 7225 | \n 7226 | case H5T_NO_CLASS:\n 7227 | case H5T_INTEGER:\n 7228 | case H5T_FLOAT:\n 7229 | case H5T_TIME:\n 7230 | case H5T_STRING:\n 7231 | case H5T_BITFIELD:\n 7232 | case H5T_OPAQUE:\n 7233 | case H5T_REFERENCE:\n 7234 | case H5T_NCLASSES:\n 7235 | default:\n 7236 | break;\n 7237 | } /* end switch */\n 7238 | \n 7239 | FUNC_LEAVE_NOAPI(SUCCEED)\n 7240 | } /* end H5T__upgrade_version_cb() */\n 7241 | \n 7242 | /*-------------------------------------------------------------------------\n 7243 | * Function: H5T__upgrade_version\n 7244 | *\n 7245 | * Purpose: Upgrade the version of a datatype (if there's any benefit to\n 7246 | * doing so) and recursively apply to compound members and/or\n 7247 | * parent datatypes.\n 7248 | *\n 7249 | * Return: Non-negative on success/Negative on failure\n 7250 | *\n 7251 | *-------------------------------------------------------------------------\n 7252 | */\n 7253 | herr_t\n 7254 | H5T__upgrade_version(H5T_t *dt, unsigned new_version)\n 7255 | {\n 7256 | herr_t ret_value = SUCCEED; /* Return value */\n 7257 | \n 7258 | FUNC_ENTER_PACKAGE\n 7259 | \n 7260 | /* Sanity check */\n 7261 | assert(dt);\n 7262 | \n 7263 | /* Iterate over entire datatype, upgrading the version of components, if it's useful */\n 7264 | if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPOSITE_LAST), H5T__upgrade_version_cb, &new_version) <\n 7265 | 0)\n 7266 | HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, \"iteration to upgrade datatype encoding version failed\");\n 7267 | \n 7268 | done:\n 7269 | FUNC_LEAVE_NOAPI(ret_value)\n 7270 | } /* end H5T__upgrade_version() */\n 7271 | \n 7272 | /*-------------------------------------------------------------------------\n 7273 | * Function: H5T_set_version\n 7274 | *\n 7275 | * Purpose: Set the encoding for a datatype to the version indicated by\n 7276 | * the file's low bound if that is higher than the datatype's\n 7277 | * version.\n 7278 | *\n 7279 | * Return: Non-negative on success/Negative on failure\n 7280 | *\n 7281 | *-------------------------------------------------------------------------\n 7282 | */\n 7283 | herr_t\n 7284 | H5T_set_version(H5F_t *f, H5T_t *dt)\n 7285 | {\n 7286 | unsigned vers; /* The version */\n 7287 | herr_t ret_value = SUCCEED; /* Return value */\n 7288 | \n 7289 | FUNC_ENTER_NOAPI(FAIL)\n 7290 | \n 7291 | /* Sanity check */\n 7292 | assert(f);\n 7293 | assert(dt);\n 7294 | \n 7295 | vers = H5O_dtype_ver_bounds[H5F_LOW_BOUND(f)];\n 7296 | if (vers > dt->shared->version) {\n 7297 | /* Upgrade the format version for the datatype */\n 7298 | if (H5T__upgrade_version(dt, vers) < 0)\n 7299 | HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, \"can't upgrade datatype encoding\");\n 7300 | }\n 7301 | \n 7302 | /* Version bounds check */\n 7303 | if (dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)])\n 7304 | HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, \"Datatype version out of bounds\");\n 7305 | \n 7306 | done:\n 7307 | FUNC_LEAVE_NOAPI(ret_value)\n 7308 | } /* end H5T_set_version() */\n 7309 | \n 7310 | /*-------------------------------------------------------------------------\n 7311 | * Function: H5T_patch_file\n 7312 | *\n 7313 | * Purpose: Patch the top-level file pointers contained in dt to point\n 7314 | * to f, if dt is a committed type. This is possible because\n 7315 | * the top-level file pointer can be closed out from under\n 7316 | * dt while dt is contained in the shared file's cache.\n 7317 | *", "src_commits": "[{\"path\":\"/src/hdf5\",\"rev\":\"6e6273e573034090378278891a14f2cc03bb5adf\",\"url\":\"https://github.com/HDFGroup/hdf5\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"h5_extended_fuzzer\",\"h5_read_fuzzer\"]", "cnt": 321, "coverage_keys": "[\"/src/hdf5/src/H5T.c\"]", "target_text": "Reach line at /src/hdf5/src/H5T.c:7217 (observed count 321).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-hdf5:v2026-07-test1@sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_digest": "sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "hdf5:merged:src/hdf5/src/H5CX.c:2263", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "hdf5", "harness": "merged", "harness_binaries": "[\"h5_extended_fuzzer\", \"h5_read_fuzzer\"]", "language": "c", "file": "/src/hdf5/src/H5CX.c", "line_start": 2263, "line_end": 2263, "line_count": 1, "function": "", "source_snippet": " 2163 | /* Get the value */\n 2164 | *dt_conv_cb = (*head)->ctx.dt_conv_cb;\n 2165 | \n 2166 | done:\n 2167 | FUNC_LEAVE_NOAPI(ret_value)\n 2168 | } /* end H5CX_get_dt_conv_cb() */\n 2169 | \n 2170 | /*-------------------------------------------------------------------------\n 2171 | * Function: H5CX_get_selection_io_mode\n 2172 | *\n 2173 | * Purpose: Retrieves the selection I/O mode for the current API call context.\n 2174 | *\n 2175 | * Return: Non-negative on success / Negative on failure\n 2176 | *\n 2177 | *-------------------------------------------------------------------------\n 2178 | */\n 2179 | herr_t\n 2180 | H5CX_get_selection_io_mode(H5D_selection_io_mode_t *selection_io_mode)\n 2181 | {\n 2182 | H5CX_node_t **head = NULL; /* Pointer to head of API context list */\n 2183 | herr_t ret_value = SUCCEED; /* Return value */\n 2184 | \n 2185 | FUNC_ENTER_NOAPI(FAIL)\n 2186 | \n 2187 | /* Sanity check */\n 2188 | assert(selection_io_mode);\n 2189 | head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */\n 2190 | assert(head && *head);\n 2191 | assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);\n 2192 | \n 2193 | H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_SELECTION_IO_MODE_NAME,\n 2194 | selection_io_mode)\n 2195 | \n 2196 | /* Get the value */\n 2197 | *selection_io_mode = (*head)->ctx.selection_io_mode;\n 2198 | \n 2199 | done:\n 2200 | FUNC_LEAVE_NOAPI(ret_value)\n 2201 | } /* end H5CX_get_selection_io_mode() */\n 2202 | \n 2203 | /*-------------------------------------------------------------------------\n 2204 | * Function: H5CX_get_no_selection_io_cause\n 2205 | *\n 2206 | * Purpose: Retrieves the cause for not performing selection I/O\n 2207 | * for the current API call context.\n 2208 | *\n 2209 | * Return: Non-negative on success / Negative on failure\n 2210 | *\n 2211 | *-------------------------------------------------------------------------\n 2212 | */\n 2213 | herr_t\n 2214 | H5CX_get_no_selection_io_cause(uint32_t *no_selection_io_cause)\n 2215 | {\n 2216 | H5CX_node_t **head = NULL; /* Pointer to head of API context list */\n 2217 | herr_t ret_value = SUCCEED; /* Return value */\n 2218 | \n 2219 | FUNC_ENTER_NOAPI(FAIL)\n 2220 | \n 2221 | /* Sanity check */\n 2222 | assert(no_selection_io_cause);\n 2223 | head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */\n 2224 | assert(head && *head);\n 2225 | assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);\n 2226 | \n 2227 | H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_NO_SELECTION_IO_CAUSE_NAME,\n 2228 | no_selection_io_cause)\n 2229 | \n 2230 | /* Get the value */\n 2231 | *no_selection_io_cause = (*head)->ctx.no_selection_io_cause;\n 2232 | \n 2233 | done:\n 2234 | FUNC_LEAVE_NOAPI(ret_value)\n 2235 | } /* end H5CX_get_no_selection_io_cause() */\n 2236 | \n 2237 | /*-------------------------------------------------------------------------\n 2238 | * Function: H5CX_get_actual_selection_io_mode\n 2239 | *\n 2240 | * Purpose: Retrieves the actual I/O mode (scalar, vector, and/or selection) for the current API call\n 2241 | *context.\n 2242 | *\n 2243 | * Return: Non-negative on success / Negative on failure\n 2244 | *\n 2245 | *-------------------------------------------------------------------------\n 2246 | */\n 2247 | herr_t\n 2248 | H5CX_get_actual_selection_io_mode(uint32_t *actual_selection_io_mode)\n 2249 | {\n 2250 | H5CX_node_t **head = NULL; /* Pointer to head of API context list */\n 2251 | herr_t ret_value = SUCCEED; /* Return value */\n 2252 | \n 2253 | FUNC_ENTER_NOAPI(FAIL)\n 2254 | \n 2255 | /* Sanity check */\n 2256 | assert(actual_selection_io_mode);\n 2257 | head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */\n 2258 | assert(head && *head);\n 2259 | assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);\n 2260 | \n 2261 | /* This property is a special case - we want to wipe out any previous setting. Copy the default setting\n 2262 | * if it has not been set yet. */\n> 2263 | if ((*head)->ctx.dxpl_id != H5P_DATASET_XFER_DEFAULT && !(*head)->ctx.actual_selection_io_mode_set &&\n 2264 | !(*head)->ctx.actual_selection_io_mode_valid) {\n 2265 | (*head)->ctx.actual_selection_io_mode = H5CX_def_dxpl_cache.actual_selection_io_mode;\n 2266 | (*head)->ctx.actual_selection_io_mode_set = true;\n 2267 | }\n 2268 | H5CX_RETRIEVE_PROP_VALID_SET(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_ACTUAL_SELECTION_IO_MODE_NAME,\n 2269 | actual_selection_io_mode)\n 2270 | \n 2271 | /* Get the value */\n 2272 | *actual_selection_io_mode = (*head)->ctx.actual_selection_io_mode;\n 2273 | \n 2274 | done:\n 2275 | FUNC_LEAVE_NOAPI(ret_value)\n 2276 | } /* end H5CX_get_actual_selection_io_mode() */\n 2277 | \n 2278 | /*-------------------------------------------------------------------------\n 2279 | * Function: H5CX_get_modify_write_buf\n 2280 | *\n 2281 | * Purpose: Retrieves the modify write buffer property for the current API call context.\n 2282 | *\n 2283 | * Return: Non-negative on success / Negative on failure\n 2284 | *\n 2285 | *-------------------------------------------------------------------------\n 2286 | */\n 2287 | herr_t\n 2288 | H5CX_get_modify_write_buf(bool *modify_write_buf)\n 2289 | {\n 2290 | H5CX_node_t **head = NULL; /* Pointer to head of API context list */\n 2291 | herr_t ret_value = SUCCEED; /* Return value */\n 2292 | \n 2293 | FUNC_ENTER_NOAPI(FAIL)\n 2294 | \n 2295 | /* Sanity check */\n 2296 | assert(modify_write_buf);\n 2297 | head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */\n 2298 | assert(head && *head);\n 2299 | assert(H5P_DEFAULT != (*head)->ctx.dxpl_id);\n 2300 | \n 2301 | H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_MODIFY_WRITE_BUF_NAME, modify_write_buf)\n 2302 | \n 2303 | /* Get the value */\n 2304 | *modify_write_buf = (*head)->ctx.modify_write_buf;\n 2305 | \n 2306 | done:\n 2307 | FUNC_LEAVE_NOAPI(ret_value)\n 2308 | } /* end H5CX_get_selection_io_mode() */\n 2309 | \n 2310 | /*-------------------------------------------------------------------------\n 2311 | * Function: H5CX_get_encoding\n 2312 | *\n 2313 | * Purpose: Retrieves the character encoding for the current API call context.\n 2314 | *\n 2315 | * Return: Non-negative on success / Negative on failure\n 2316 | *\n 2317 | *-------------------------------------------------------------------------\n 2318 | */\n 2319 | herr_t\n 2320 | H5CX_get_encoding(H5T_cset_t *encoding)\n 2321 | {\n 2322 | H5CX_node_t **head = NULL; /* Pointer to head of API context list */\n 2323 | herr_t ret_value = SUCCEED; /* Return value */\n 2324 | \n 2325 | FUNC_ENTER_NOAPI(FAIL)\n 2326 | \n 2327 | /* Sanity check */\n 2328 | assert(encoding);\n 2329 | head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */\n 2330 | assert(head && *head);\n 2331 | assert(H5P_DEFAULT != (*head)->ctx.lcpl_id);\n 2332 | \n 2333 | H5CX_RETRIEVE_PROP_VALID(lcpl, H5P_LINK_CREATE_DEFAULT, H5P_STRCRT_CHAR_ENCODING_NAME, encoding)\n 2334 | \n 2335 | /* Get the value */\n 2336 | *encoding = (*head)->ctx.encoding;\n 2337 | \n 2338 | done:\n 2339 | FUNC_LEAVE_NOAPI(ret_value)\n 2340 | } /* end H5CX_get_encoding() */\n 2341 | \n 2342 | /*-------------------------------------------------------------------------\n 2343 | * Function: H5CX_get_intermediate_group\n 2344 | *\n 2345 | * Purpose: Retrieves the create intermediate group flag for the current API call context.\n 2346 | *\n 2347 | * Return: Non-negative on success / Negative on failure\n 2348 | *\n 2349 | *-------------------------------------------------------------------------\n 2350 | */\n 2351 | herr_t\n 2352 | H5CX_get_intermediate_group(unsigned *crt_intermed_group)\n 2353 | {\n 2354 | H5CX_node_t **head = NULL; /* Pointer to head of API context list */\n 2355 | herr_t ret_value = SUCCEED; /* Return value */\n 2356 | \n 2357 | FUNC_ENTER_NOAPI(FAIL)\n 2358 | \n 2359 | /* Sanity check */\n 2360 | assert(crt_intermed_group);\n 2361 | head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */\n 2362 | assert(head && *head);\n 2363 | assert(H5P_DEFAULT != (*head)->ctx.lcpl_id);", "src_commits": "[{\"path\":\"/src/hdf5\",\"rev\":\"6e6273e573034090378278891a14f2cc03bb5adf\",\"url\":\"https://github.com/HDFGroup/hdf5\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"h5_extended_fuzzer\",\"h5_read_fuzzer\"]", "cnt": 10, "coverage_keys": "[\"/src/hdf5/src/H5CX.c\"]", "target_text": "Reach line at /src/hdf5/src/H5CX.c:2263 (observed count 10).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-hdf5:v2026-07-test1@sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_digest": "sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "hdf5:merged:src/hdf5/src/H5Olayout.c:338", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "hdf5", "harness": "merged", "harness_binaries": "[\"h5_extended_fuzzer\", \"h5_read_fuzzer\"]", "language": "c", "file": "/src/hdf5/src/H5Olayout.c", "line_start": 338, "line_end": 338, "line_count": 1, "function": "", "source_snippet": " 238 | /* Allocate space for compact data */\n 239 | if (NULL == (mesg->storage.u.compact.buf = H5MM_malloc(mesg->storage.u.compact.size)))\n 240 | HGOTO_ERROR(H5E_OHDR, H5E_CANTALLOC, NULL,\n 241 | \"memory allocation failed for compact data buffer\");\n 242 | \n 243 | /* Compact data */\n 244 | H5MM_memcpy(mesg->storage.u.compact.buf, p, mesg->storage.u.compact.size);\n 245 | p += mesg->storage.u.compact.size;\n 246 | }\n 247 | \n 248 | /* Set the layout operations */\n 249 | mesg->ops = H5D_LOPS_COMPACT;\n 250 | break;\n 251 | \n 252 | case H5D_CONTIGUOUS:\n 253 | /* Contiguous storage address */\n 254 | if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end))\n 255 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, \"ran off end of input buffer while decoding\");\n 256 | H5F_addr_decode(f, &p, &(mesg->storage.u.contig.addr));\n 257 | \n 258 | /* Contiguous storage size */\n 259 | if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f), p_end))\n 260 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, \"ran off end of input buffer while decoding\");\n 261 | H5F_DECODE_LENGTH(f, p, mesg->storage.u.contig.size);\n 262 | \n 263 | /* Set the layout operations */\n 264 | mesg->ops = H5D_LOPS_CONTIG;\n 265 | break;\n 266 | \n 267 | case H5D_CHUNKED:\n 268 | if (mesg->version < H5O_LAYOUT_VERSION_4) {\n 269 | /* Set the chunked layout flags */\n 270 | mesg->u.chunk.flags = (uint8_t)0;\n 271 | \n 272 | /* Dimensionality */\n 273 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 274 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 275 | \"ran off end of input buffer while decoding\");\n 276 | mesg->u.chunk.ndims = *p++;\n 277 | \n 278 | if (mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS)\n 279 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, \"dimensionality is too large\");\n 280 | if (mesg->u.chunk.ndims < 2)\n 281 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, \"bad dimensions for chunked storage\");\n 282 | \n 283 | /* B-tree address */\n 284 | if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_addr(f), p_end))\n 285 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 286 | \"ran off end of input buffer while decoding\");\n 287 | H5F_addr_decode(f, &p, &(mesg->storage.u.chunk.idx_addr));\n 288 | \n 289 | if (H5_IS_BUFFER_OVERFLOW(p, (mesg->u.chunk.ndims * 4), p_end))\n 290 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 291 | \"ran off end of input buffer while decoding\");\n 292 | \n 293 | /* Chunk dimensions */\n 294 | for (unsigned u = 0; u < mesg->u.chunk.ndims; u++) {\n 295 | \n 296 | UINT32DECODE(p, mesg->u.chunk.dim[u]);\n 297 | \n 298 | /* Just in case that something goes very wrong, such as file corruption. */\n 299 | if (mesg->u.chunk.dim[u] == 0)\n 300 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,\n 301 | \"bad chunk dimension value when parsing layout message - chunk \"\n 302 | \"dimension must be positive: mesg->u.chunk.dim[%u] = %\" PRIuHSIZE,\n 303 | u, mesg->u.chunk.dim[u]);\n 304 | }\n 305 | \n 306 | /* Compute chunk size */\n 307 | mesg->u.chunk.size = mesg->u.chunk.dim[0];\n 308 | for (unsigned u = 1; u < mesg->u.chunk.ndims; u++)\n 309 | mesg->u.chunk.size *= mesg->u.chunk.dim[u];\n 310 | \n 311 | /* Set the chunk operations\n 312 | * (Only \"btree\" indexing type supported with v3 of message format)\n 313 | */\n 314 | mesg->storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE;\n 315 | mesg->storage.u.chunk.ops = H5D_COPS_BTREE;\n 316 | }\n 317 | else {\n 318 | /* Get the chunked layout flags */\n 319 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 320 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 321 | \"ran off end of input buffer while decoding\");\n 322 | mesg->u.chunk.flags = *p++;\n 323 | \n 324 | /* Check for valid flags */\n 325 | /* (Currently issues an error for all non-zero values,\n 326 | * until features are added for the flags)\n 327 | */\n 328 | if (mesg->u.chunk.flags & ~H5O_LAYOUT_ALL_CHUNK_FLAGS)\n 329 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, \"bad flag value for message\");\n 330 | \n 331 | /* Dimensionality */\n 332 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 333 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 334 | \"ran off end of input buffer while decoding\");\n 335 | mesg->u.chunk.ndims = *p++;\n 336 | \n 337 | if (mesg->u.chunk.ndims > H5O_LAYOUT_NDIMS)\n> 338 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, \"dimensionality is too large\");\n 339 | \n 340 | /* Encoded # of bytes for each chunk dimension */\n 341 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 342 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 343 | \"ran off end of input buffer while decoding\");\n 344 | mesg->u.chunk.enc_bytes_per_dim = *p++;\n 345 | \n 346 | if (mesg->u.chunk.enc_bytes_per_dim == 0 || mesg->u.chunk.enc_bytes_per_dim > 8)\n 347 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,\n 348 | \"encoded chunk dimension size is too large\");\n 349 | \n 350 | if (H5_IS_BUFFER_OVERFLOW(p, (mesg->u.chunk.ndims * mesg->u.chunk.enc_bytes_per_dim),\n 351 | p_end))\n 352 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 353 | \"ran off end of input buffer while decoding\");\n 354 | \n 355 | /* Chunk dimensions */\n 356 | for (unsigned u = 0; u < mesg->u.chunk.ndims; u++) {\n 357 | UINT64DECODE_VAR(p, mesg->u.chunk.dim[u], mesg->u.chunk.enc_bytes_per_dim);\n 358 | \n 359 | /* Just in case that something goes very wrong, such as file corruption. */\n 360 | if (mesg->u.chunk.dim[u] == 0)\n 361 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,\n 362 | \"bad chunk dimension value when parsing layout message - chunk \"\n 363 | \"dimension must be positive: mesg->u.chunk.dim[%u] = %\" PRIuHSIZE,\n 364 | u, mesg->u.chunk.dim[u]);\n 365 | }\n 366 | \n 367 | /* Compute chunk size */\n 368 | mesg->u.chunk.size = mesg->u.chunk.dim[0];\n 369 | for (unsigned u = 1; u < mesg->u.chunk.ndims; u++)\n 370 | mesg->u.chunk.size *= mesg->u.chunk.dim[u];\n 371 | \n 372 | /* Chunk index type */\n 373 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 374 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 375 | \"ran off end of input buffer while decoding\");\n 376 | mesg->u.chunk.idx_type = (H5D_chunk_index_t)*p++;\n 377 | \n 378 | if (mesg->u.chunk.idx_type >= H5D_CHUNK_IDX_NTYPES)\n 379 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, \"unknown chunk index type\");\n 380 | mesg->storage.u.chunk.idx_type = mesg->u.chunk.idx_type;\n 381 | \n 382 | switch (mesg->u.chunk.idx_type) {\n 383 | case H5D_CHUNK_IDX_BTREE:\n 384 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,\n 385 | \"v1 B-tree index type should never be in a v4 layout message\");\n 386 | break;\n 387 | \n 388 | case H5D_CHUNK_IDX_NONE: /* Implicit Index */\n 389 | mesg->storage.u.chunk.ops = H5D_COPS_NONE;\n 390 | break;\n 391 | \n 392 | case H5D_CHUNK_IDX_SINGLE: /* Single Chunk Index */\n 393 | if (mesg->u.chunk.flags & H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER) {\n 394 | uint64_t nbytes = 0;\n 395 | \n 396 | if (H5_IS_BUFFER_OVERFLOW(p, H5F_sizeof_size(f) + 4, p_end))\n 397 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 398 | \"ran off end of input buffer while decoding\");\n 399 | \n 400 | H5F_DECODE_LENGTH(f, p, nbytes);\n 401 | H5_CHECKED_ASSIGN(mesg->storage.u.chunk.u.single.nbytes, uint32_t, nbytes,\n 402 | uint64_t);\n 403 | \n 404 | UINT32DECODE(p, mesg->storage.u.chunk.u.single.filter_mask);\n 405 | }\n 406 | \n 407 | /* Set the chunk operations */\n 408 | mesg->storage.u.chunk.ops = H5D_COPS_SINGLE;\n 409 | break;\n 410 | \n 411 | case H5D_CHUNK_IDX_FARRAY:\n 412 | /* Fixed array creation parameters */\n 413 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 414 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 415 | \"ran off end of input buffer while decoding\");\n 416 | mesg->u.chunk.u.farray.cparam.max_dblk_page_nelmts_bits = *p++;\n 417 | \n 418 | if (0 == mesg->u.chunk.u.farray.cparam.max_dblk_page_nelmts_bits)\n 419 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,\n 420 | \"invalid fixed array creation parameter\");\n 421 | \n 422 | /* Set the chunk operations */\n 423 | mesg->storage.u.chunk.ops = H5D_COPS_FARRAY;\n 424 | break;\n 425 | \n 426 | case H5D_CHUNK_IDX_EARRAY:\n 427 | /* Extensible array creation parameters */\n 428 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 429 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,\n 430 | \"ran off end of input buffer while decoding\");\n 431 | mesg->u.chunk.u.earray.cparam.max_nelmts_bits = *p++;\n 432 | \n 433 | if (0 == mesg->u.chunk.u.earray.cparam.max_nelmts_bits)\n 434 | HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL,\n 435 | \"invalid extensible array creation parameter\");\n 436 | \n 437 | if (H5_IS_BUFFER_OVERFLOW(p, 1, p_end))\n 438 | HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,", "src_commits": "[{\"path\":\"/src/hdf5\",\"rev\":\"6e6273e573034090378278891a14f2cc03bb5adf\",\"url\":\"https://github.com/HDFGroup/hdf5\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"h5_extended_fuzzer\",\"h5_read_fuzzer\"]", "cnt": 1, "coverage_keys": "[\"/src/hdf5/src/H5Olayout.c\"]", "target_text": "Reach line at /src/hdf5/src/H5Olayout.c:338 (observed count 1).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-hdf5:v2026-07-test1@sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_digest": "sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "hdf5:merged:src/hdf5/src/H5T.c:7208", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "hdf5", "harness": "merged", "harness_binaries": "[\"h5_extended_fuzzer\", \"h5_read_fuzzer\"]", "language": "c", "file": "/src/hdf5/src/H5T.c", "line_start": 7208, "line_end": 7208, "line_count": 1, "function": "", "source_snippet": " 7108 | if (H5T_REFERENCE == dt->shared->type && !dt->shared->u.atomic.u.r.opaque)\n 7109 | HGOTO_DONE(true);\n 7110 | \n 7111 | /* Check for types that might have the correct type as a component */\n 7112 | switch (dt->shared->type) {\n 7113 | case H5T_COMPOUND:\n 7114 | /* Iterate over all the compound datatype's fields */\n 7115 | for (u = 0; u < dt->shared->u.compnd.nmembs; u++)\n 7116 | /* Recurse on field's datatype */\n 7117 | if (H5T__detect_vlen_ref(dt->shared->u.compnd.memb[u].type))\n 7118 | HGOTO_DONE(true);\n 7119 | break;\n 7120 | \n 7121 | case H5T_ARRAY:\n 7122 | case H5T_VLEN:\n 7123 | case H5T_ENUM:\n 7124 | HGOTO_DONE(H5T__detect_vlen_ref(dt->shared->parent));\n 7125 | break;\n 7126 | \n 7127 | case H5T_NO_CLASS:\n 7128 | case H5T_INTEGER:\n 7129 | case H5T_FLOAT:\n 7130 | case H5T_TIME:\n 7131 | case H5T_STRING:\n 7132 | case H5T_BITFIELD:\n 7133 | case H5T_OPAQUE:\n 7134 | case H5T_REFERENCE:\n 7135 | case H5T_COMPLEX:\n 7136 | case H5T_NCLASSES:\n 7137 | default:\n 7138 | break;\n 7139 | } /* end if */\n 7140 | \n 7141 | done:\n 7142 | FUNC_LEAVE_NOAPI(ret_value)\n 7143 | } /* end H5T__detect_vlen_ref() */\n 7144 | \n 7145 | /*-------------------------------------------------------------------------\n 7146 | * Function: H5T_is_vl_storage\n 7147 | *\n 7148 | * Purpose: Check if a datatype will be stored in a variable-length form.\n 7149 | *\n 7150 | * Notes: Currently, only variable-length string & sequences and region\n 7151 | * references are stored in a variable-length form.\n 7152 | *\n 7153 | * Return:\n 7154 | * One of two values on success:\n 7155 | * true - If the datatype will be stored in a variable-length form\n 7156 | * false - If the datatype will NOT be stored in a variable-length form\n 7157 | * <0 is returned on failure\n 7158 | *\n 7159 | *-------------------------------------------------------------------------\n 7160 | */\n 7161 | htri_t\n 7162 | H5T_is_vl_storage(const H5T_t *dt)\n 7163 | {\n 7164 | htri_t ret_value = false;\n 7165 | \n 7166 | FUNC_ENTER_NOAPI(FAIL)\n 7167 | \n 7168 | /* Sanity check */\n 7169 | assert(dt);\n 7170 | \n 7171 | /* VL and region reference datatypes are stored in variable-length form */\n 7172 | if (H5T_detect_class(dt, H5T_VLEN, false))\n 7173 | ret_value = true;\n 7174 | else if (H5T_detect_class(dt, H5T_REFERENCE, false))\n 7175 | ret_value = H5T__detect_vlen_ref(dt);\n 7176 | else\n 7177 | ret_value = false;\n 7178 | \n 7179 | done:\n 7180 | FUNC_LEAVE_NOAPI(ret_value)\n 7181 | } /* end H5T_is_vl_storage() */\n 7182 | \n 7183 | /*-------------------------------------------------------------------------\n 7184 | * Function: H5T__upgrade_version_cb\n 7185 | *\n 7186 | * Purpose: H5T__visit callback to Upgrade the version of a datatype\n 7187 | * (if there's any benefit to doing so)\n 7188 | *\n 7189 | * Note: The behavior below is tightly coupled with the \"better\"\n 7190 | * encodings for datatype messages in the datatype message\n 7191 | * encoding routine.\n 7192 | *\n 7193 | * Return: Non-negative on success/Negative on failure\n 7194 | *\n 7195 | *-------------------------------------------------------------------------\n 7196 | */\n 7197 | static herr_t\n 7198 | H5T__upgrade_version_cb(H5T_t *dt, void *op_value)\n 7199 | {\n 7200 | FUNC_ENTER_PACKAGE_NOERR\n 7201 | \n 7202 | /* Sanity check */\n 7203 | assert(dt);\n 7204 | assert(op_value);\n 7205 | \n 7206 | /* Special behavior for each type of datatype */\n 7207 | switch (dt->shared->type) {\n> 7208 | case H5T_COMPOUND:\n 7209 | case H5T_ARRAY:\n 7210 | case H5T_ENUM:\n 7211 | /* These types benefit from \"upgrading\" their version */\n 7212 | if (*(unsigned *)op_value > dt->shared->version)\n 7213 | dt->shared->version = *(unsigned *)op_value;\n 7214 | break;\n 7215 | \n 7216 | case H5T_VLEN:\n 7217 | if (dt->shared->parent->shared->version > dt->shared->version)\n 7218 | dt->shared->version = dt->shared->parent->shared->version;\n 7219 | break;\n 7220 | \n 7221 | case H5T_COMPLEX:\n 7222 | if (dt->shared->parent->shared->version > dt->shared->version)\n 7223 | dt->shared->version = dt->shared->parent->shared->version;\n 7224 | break;\n 7225 | \n 7226 | case H5T_NO_CLASS:\n 7227 | case H5T_INTEGER:\n 7228 | case H5T_FLOAT:\n 7229 | case H5T_TIME:\n 7230 | case H5T_STRING:\n 7231 | case H5T_BITFIELD:\n 7232 | case H5T_OPAQUE:\n 7233 | case H5T_REFERENCE:\n 7234 | case H5T_NCLASSES:\n 7235 | default:\n 7236 | break;\n 7237 | } /* end switch */\n 7238 | \n 7239 | FUNC_LEAVE_NOAPI(SUCCEED)\n 7240 | } /* end H5T__upgrade_version_cb() */\n 7241 | \n 7242 | /*-------------------------------------------------------------------------\n 7243 | * Function: H5T__upgrade_version\n 7244 | *\n 7245 | * Purpose: Upgrade the version of a datatype (if there's any benefit to\n 7246 | * doing so) and recursively apply to compound members and/or\n 7247 | * parent datatypes.\n 7248 | *\n 7249 | * Return: Non-negative on success/Negative on failure\n 7250 | *\n 7251 | *-------------------------------------------------------------------------\n 7252 | */\n 7253 | herr_t\n 7254 | H5T__upgrade_version(H5T_t *dt, unsigned new_version)\n 7255 | {\n 7256 | herr_t ret_value = SUCCEED; /* Return value */\n 7257 | \n 7258 | FUNC_ENTER_PACKAGE\n 7259 | \n 7260 | /* Sanity check */\n 7261 | assert(dt);\n 7262 | \n 7263 | /* Iterate over entire datatype, upgrading the version of components, if it's useful */\n 7264 | if (H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPOSITE_LAST), H5T__upgrade_version_cb, &new_version) <\n 7265 | 0)\n 7266 | HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, \"iteration to upgrade datatype encoding version failed\");\n 7267 | \n 7268 | done:\n 7269 | FUNC_LEAVE_NOAPI(ret_value)\n 7270 | } /* end H5T__upgrade_version() */\n 7271 | \n 7272 | /*-------------------------------------------------------------------------\n 7273 | * Function: H5T_set_version\n 7274 | *\n 7275 | * Purpose: Set the encoding for a datatype to the version indicated by\n 7276 | * the file's low bound if that is higher than the datatype's\n 7277 | * version.\n 7278 | *\n 7279 | * Return: Non-negative on success/Negative on failure\n 7280 | *\n 7281 | *-------------------------------------------------------------------------\n 7282 | */\n 7283 | herr_t\n 7284 | H5T_set_version(H5F_t *f, H5T_t *dt)\n 7285 | {\n 7286 | unsigned vers; /* The version */\n 7287 | herr_t ret_value = SUCCEED; /* Return value */\n 7288 | \n 7289 | FUNC_ENTER_NOAPI(FAIL)\n 7290 | \n 7291 | /* Sanity check */\n 7292 | assert(f);\n 7293 | assert(dt);\n 7294 | \n 7295 | vers = H5O_dtype_ver_bounds[H5F_LOW_BOUND(f)];\n 7296 | if (vers > dt->shared->version) {\n 7297 | /* Upgrade the format version for the datatype */\n 7298 | if (H5T__upgrade_version(dt, vers) < 0)\n 7299 | HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, \"can't upgrade datatype encoding\");\n 7300 | }\n 7301 | \n 7302 | /* Version bounds check */\n 7303 | if (dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)])\n 7304 | HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, \"Datatype version out of bounds\");\n 7305 | \n 7306 | done:\n 7307 | FUNC_LEAVE_NOAPI(ret_value)\n 7308 | } /* end H5T_set_version() */", "src_commits": "[{\"path\":\"/src/hdf5\",\"rev\":\"6e6273e573034090378278891a14f2cc03bb5adf\",\"url\":\"https://github.com/HDFGroup/hdf5\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"h5_extended_fuzzer\",\"h5_read_fuzzer\"]", "cnt": 292, "coverage_keys": "[\"/src/hdf5/src/H5T.c\"]", "target_text": "Reach line at /src/hdf5/src/H5T.c:7208 (observed count 292).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-hdf5:v2026-07-test1@sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_digest": "sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "hdf5:merged:src/hdf5/src/H5Fsuper.c:681", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "hdf5", "harness": "merged", "harness_binaries": "[\"h5_extended_fuzzer\", \"h5_read_fuzzer\"]", "language": "c", "file": "/src/hdf5/src/H5Fsuper.c", "line_start": 681, "line_end": 681, "line_count": 1, "function": "", "source_snippet": " 581 | * Tell the file driver how much address space has already been\n 582 | * allocated so that it knows how to allocate additional memory.\n 583 | */\n 584 | \n 585 | /* Set the ring type in the API context */\n 586 | H5AC_set_ring(H5AC_RING_SBE, NULL);\n 587 | \n 588 | /* Decode the optional driver information block */\n 589 | if (H5_addr_defined(sblock->driver_addr)) {\n 590 | H5O_drvinfo_t *drvinfo; /* Driver info */\n 591 | H5F_drvrinfo_cache_ud_t drvrinfo_udata; /* User data for metadata callbacks */\n 592 | unsigned drvinfo_flags = H5AC__NO_FLAGS_SET; /* Flags used in driver info block unprotect call */\n 593 | \n 594 | /* Sanity check - driver info block should only be defined for\n 595 | * superblock version < 2.\n 596 | */\n 597 | assert(sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2);\n 598 | \n 599 | /* Set up user data */\n 600 | drvrinfo_udata.f = f;\n 601 | drvrinfo_udata.driver_addr = sblock->driver_addr;\n 602 | \n 603 | /* extend EOA so we can read at least the fixed sized\n 604 | * portion of the driver info block\n 605 | */\n 606 | if (H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) <\n 607 | 0) /* will extend eoa later if required */\n 608 | HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, \"set end of space allocation request failed\");\n 609 | \n 610 | /* Look up the driver info block */\n 611 | if (NULL == (drvinfo = (H5O_drvinfo_t *)H5AC_protect(f, H5AC_DRVRINFO, sblock->driver_addr,\n 612 | &drvrinfo_udata, rw_flags)))\n 613 | HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, \"unable to load driver info block\");\n 614 | \n 615 | /* Loading the driver info block is enough to set up the right info */\n 616 | \n 617 | /* Check if we need to rewrite the driver info block info */\n 618 | if (((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_DRVRINFO_LOAD))\n 619 | drvinfo_flags |= H5AC__DIRTIED_FLAG;\n 620 | \n 621 | /* set the pin entry flag so that the driver information block\n 622 | * cache entry will be pinned in the cache.\n 623 | */\n 624 | drvinfo_flags |= H5AC__PIN_ENTRY_FLAG;\n 625 | \n 626 | /* Release the driver info block */\n 627 | if (H5AC_unprotect(f, H5AC_DRVRINFO, sblock->driver_addr, drvinfo, drvinfo_flags) < 0)\n 628 | HGOTO_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, \"unable to release driver info block\");\n 629 | \n 630 | /* save a pointer to the driver information cache entry */\n 631 | f->shared->drvinfo = drvinfo;\n 632 | } /* end if */\n 633 | \n 634 | /* (Account for the stored EOA being absolute offset -NAF) */\n 635 | if (H5F__set_eoa(f, H5FD_MEM_DEFAULT, udata.stored_eof - sblock->base_addr) < 0)\n 636 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set end-of-address marker for file\");\n 637 | \n 638 | /* Decode the optional superblock extension info */\n 639 | if (H5_addr_defined(sblock->ext_addr)) {\n 640 | H5O_loc_t ext_loc; /* \"Object location\" for superblock extension */\n 641 | H5O_btreek_t btreek; /* v1 B-tree 'K' value message from superblock extension */\n 642 | H5O_drvinfo_t drvinfo; /* Driver info message from superblock extension */\n 643 | size_t u; /* Local index variable */\n 644 | htri_t status; /* Status for message existing */\n 645 | \n 646 | /* Sanity check - superblock extension should only be defined for\n 647 | * superblock version >= 2.\n 648 | */\n 649 | if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2)\n 650 | HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,\n 651 | \"invalid superblock - extension message should not be defined for version < 2\");\n 652 | \n 653 | /* Check for superblock extension being located \"outside\" the stored\n 654 | * 'eoa' value, which can occur with the split/multi VFD.\n 655 | */\n 656 | if (H5_addr_gt(sblock->ext_addr, udata.stored_eof)) {\n 657 | /* Set the 'eoa' for the object header memory type large enough\n 658 | * to give some room for a reasonably sized superblock extension.\n 659 | * (This is _rather_ a kludge -QAK)\n 660 | */\n 661 | if (H5F__set_eoa(f, H5FD_MEM_OHDR, (haddr_t)(sblock->ext_addr + 1024)) < 0)\n 662 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set end-of-address marker for file\");\n 663 | } /* end if */\n 664 | \n 665 | /* Open the superblock extension */\n 666 | if (H5F__super_ext_open(f, sblock->ext_addr, &ext_loc) < 0)\n 667 | HGOTO_ERROR(H5E_FILE, H5E_CANTOPENOBJ, FAIL, \"unable to open file's superblock extension\");\n 668 | \n 669 | /* Check for the extension having a 'driver info' message */\n 670 | if ((status = H5O_msg_exists(&ext_loc, H5O_DRVINFO_ID)) < 0)\n 671 | HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, \"unable to read object header\");\n 672 | if (status) {\n 673 | /* Check for ignoring the driver info for this file */\n 674 | if (!udata.ignore_drvrinfo) {\n 675 | \n 676 | /* Retrieve the 'driver info' structure */\n 677 | if (NULL == H5O_msg_read(&ext_loc, H5O_DRVINFO_ID, &drvinfo))\n 678 | HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, \"driver info message not present\");\n 679 | \n 680 | /* Validate and decode driver information */\n> 681 | if (H5FD_sb_load(f->shared->lf, drvinfo.name, drvinfo.buf) < 0) {\n 682 | H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo);\n 683 | HGOTO_ERROR(H5E_FILE, H5E_CANTDECODE, FAIL, \"unable to decode driver information\");\n 684 | } /* end if */\n 685 | \n 686 | /* Reset driver info message */\n 687 | H5O_msg_reset(H5O_DRVINFO_ID, &drvinfo);\n 688 | \n 689 | assert(false == f->shared->drvinfo_sb_msg_exists);\n 690 | f->shared->drvinfo_sb_msg_exists = true;\n 691 | } /* end else */\n 692 | } /* end if */\n 693 | \n 694 | /* Read in the shared OH message information if there is any */\n 695 | if (H5SM_get_info(&ext_loc, c_plist) < 0)\n 696 | HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, \"unable to read SOHM table information\");\n 697 | \n 698 | /* Check for the extension having a 'v1 B-tree \"K\"' message */\n 699 | if ((status = H5O_msg_exists(&ext_loc, H5O_BTREEK_ID)) < 0)\n 700 | HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, \"unable to read object header\");\n 701 | if (status) {\n 702 | /* Retrieve the 'v1 B-tree \"K\"' structure */\n 703 | if (NULL == H5O_msg_read(&ext_loc, H5O_BTREEK_ID, &btreek))\n 704 | HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, \"v1 B-tree 'K' info message not present\");\n 705 | \n 706 | /* Set non-default v1 B-tree 'K' value info from file */\n 707 | sblock->btree_k[H5B_CHUNK_ID] = btreek.btree_k[H5B_CHUNK_ID];\n 708 | sblock->btree_k[H5B_SNODE_ID] = btreek.btree_k[H5B_SNODE_ID];\n 709 | sblock->sym_leaf_k = btreek.sym_leaf_k;\n 710 | \n 711 | /* Set non-default v1 B-tree 'K' values in the property list */\n 712 | if (H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, btreek.btree_k) < 0)\n 713 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set rank for btree internal nodes\");\n 714 | if (H5P_set(c_plist, H5F_CRT_SYM_LEAF_NAME, &btreek.sym_leaf_k) < 0)\n 715 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set rank for symbol table leaf nodes\");\n 716 | } /* end if */\n 717 | \n 718 | /* Check for the extension having a 'free-space manager info' message */\n 719 | if ((status = H5O_msg_exists(&ext_loc, H5O_FSINFO_ID)) < 0)\n 720 | HGOTO_ERROR(H5E_FILE, H5E_EXISTS, FAIL, \"unable to read object header\");\n 721 | if (status) {\n 722 | uint8_t flags; /* Message flags */\n 723 | \n 724 | /* Get message flags */\n 725 | if (H5O_msg_get_flags(&ext_loc, H5O_FSINFO_ID, &flags) < 0)\n 726 | HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL,\n 727 | \"unable to message flags for free-space manager info message\");\n 728 | \n 729 | /* If message is NOT marked \"unknown\"--set up file space info */\n 730 | if (!(flags & H5O_MSG_FLAG_WAS_UNKNOWN)) {\n 731 | H5O_fsinfo_t fsinfo; /* File space info message from superblock extension */\n 732 | \n 733 | memset(&fsinfo, 0, sizeof(H5O_fsinfo_t));\n 734 | \n 735 | /* f->shared->null_fsm_addr: Whether to drop free-space to the floor */\n 736 | /* The h5clear tool uses this property to tell the library\n 737 | * to drop free-space to the floor\n 738 | */\n 739 | if (H5P_exist_plist(fa_plist, H5F_ACS_NULL_FSM_ADDR_NAME) > 0)\n 740 | if (H5P_get(fa_plist, H5F_ACS_NULL_FSM_ADDR_NAME, &f->shared->null_fsm_addr) < 0)\n 741 | HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL,\n 742 | \"can't get clearance for persisting fsm addr\");\n 743 | \n 744 | /* Retrieve the 'file space info' structure */\n 745 | if (NULL == H5O_msg_read(&ext_loc, H5O_FSINFO_ID, &fsinfo))\n 746 | HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, \"unable to get free-space manager info message\");\n 747 | \n 748 | /* Version bounds check */\n 749 | if (H5O_fsinfo_check_version(H5F_HIGH_BOUND(f), &fsinfo) < 0)\n 750 | HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL,\n 751 | \"File space info message's version out of bounds\");\n 752 | \n 753 | /* Update changed values */\n 754 | if (f->shared->fs_version != fsinfo.version)\n 755 | f->shared->fs_version = fsinfo.version;\n 756 | if (f->shared->fs_strategy != fsinfo.strategy) {\n 757 | f->shared->fs_strategy = fsinfo.strategy;\n 758 | \n 759 | /* Set non-default strategy in the property list */\n 760 | if (H5P_set(c_plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &fsinfo.strategy) < 0)\n 761 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set file space strategy\");\n 762 | } /* end if */\n 763 | if (f->shared->fs_persist != fsinfo.persist) {\n 764 | f->shared->fs_persist = fsinfo.persist;\n 765 | \n 766 | /* Set non-default strategy in the property list */\n 767 | if (H5P_set(c_plist, H5F_CRT_FREE_SPACE_PERSIST_NAME, &fsinfo.persist) < 0)\n 768 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set file space strategy\");\n 769 | } /* end if */\n 770 | if (f->shared->fs_threshold != fsinfo.threshold) {\n 771 | f->shared->fs_threshold = fsinfo.threshold;\n 772 | \n 773 | /* Set non-default threshold in the property list */\n 774 | if (H5P_set(c_plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &fsinfo.threshold) < 0)\n 775 | HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, \"unable to set file space strategy\");\n 776 | } /* end if */\n 777 | \n 778 | if (f->shared->fs_page_size < H5F_FILE_SPACE_PAGE_SIZE_MIN)\n 779 | HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, \"file space page size too small\");\n 780 | if (fsinfo.page_size < H5F_FILE_SPACE_PAGE_SIZE_MIN)\n 781 | HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, \"file space page size too small\");", "src_commits": "[{\"path\":\"/src/hdf5\",\"rev\":\"6e6273e573034090378278891a14f2cc03bb5adf\",\"url\":\"https://github.com/HDFGroup/hdf5\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"h5_extended_fuzzer\",\"h5_read_fuzzer\"]", "cnt": 1, "coverage_keys": "[\"/src/hdf5/src/H5Fsuper.c\"]", "target_text": "Reach line at /src/hdf5/src/H5Fsuper.c:681 (observed count 1).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-hdf5:v2026-07-test1@sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_digest": "sha256:23dac6e302371f1fa5341a1e54d537d41168b125a39a1e902464700daaae91a6", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "karchive:merged:src/qtbase/src/corelib/tools/qhash.cpp:526", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "karchive", "harness": "merged", "harness_binaries": "[\"k7z_fuzzer\", \"kar_fuzzer\", \"ktar_bz2_fuzzer\", \"ktar_fuzzer\", \"ktar_gz_fuzzer\", \"ktar_lz_fuzzer\", \"ktar_xz_fuzzer\", \"ktar_zst_fuzzer\", \"kzip_fuzzer\"]", "language": "c++", "file": "/src/qtbase/src/corelib/tools/qhash.cpp", "line_start": 526, "line_end": 526, "line_count": 1, "function": "", "source_snippet": " 426 | // hash twice 16 bytes, running 2 scramble rounds of AES on itself\n 427 | template <ZeroExtension ZX>\n 428 | static void QT_FUNCTION_TARGET(AES) QT_VECTORCALL\n 429 | hash2x16bytes(__m128i &state0, __m128i &state1, const __m128i *src0, const __m128i *src1)\n 430 | {\n 431 | __m128i data0 = loadu128<ZX>(src0);\n 432 | __m128i data1 = loadu128<ZX>(src1);\n 433 | state0 = _mm_xor_si128(data0, state0);\n 434 | state1 = _mm_xor_si128(data1, state1);\n 435 | state0 = _mm_aesenc_si128(state0, state0);\n 436 | state1 = _mm_aesenc_si128(state1, state1);\n 437 | state0 = _mm_aesenc_si128(state0, state0);\n 438 | state1 = _mm_aesenc_si128(state1, state1);\n 439 | }\n 440 | \n 441 | struct AESHashSeed\n 442 | {\n 443 | __m128i state0;\n 444 | __m128i mseed2;\n 445 | AESHashSeed(size_t seed, size_t seed2) QT_FUNCTION_TARGET(AES);\n 446 | __m128i state1() const QT_FUNCTION_TARGET(AES);\n 447 | __m256i state0_256() const QT_FUNCTION_TARGET(AES_AVX2)\n 448 | { return _mm256_set_m128i(state1(), state0); }\n 449 | };\n 450 | } // unnamed namespace\n 451 | \n 452 | Q_ALWAYS_INLINE AESHashSeed::AESHashSeed(size_t seed, size_t seed2)\n 453 | {\n 454 | __m128i mseed = mm_cvtsz_si128(seed);\n 455 | mseed2 = mm_set1_epz(seed2);\n 456 | \n 457 | // mseed (epi16) = [ seed, seed >> 16, seed >> 32, seed >> 48, len, 0, 0, 0 ]\n 458 | mseed = _mm_insert_epi16(mseed, short(seed), 4);\n 459 | // mseed (epi16) = [ seed, seed >> 16, seed >> 32, seed >> 48, len, len, len, len ]\n 460 | mseed = _mm_shufflehi_epi16(mseed, 0);\n 461 | \n 462 | // merge with the process-global seed\n 463 | __m128i key = _mm_xor_si128(mseed, mseed2);\n 464 | \n 465 | // scramble the key\n 466 | __m128i state0 = _mm_aesenc_si128(key, key);\n 467 | this->state0 = state0;\n 468 | }\n 469 | \n 470 | Q_ALWAYS_INLINE __m128i AESHashSeed::state1() const\n 471 | {\n 472 | {\n 473 | // unlike the Go code, we don't have more per-process seed\n 474 | __m128i state1 = _mm_aesenc_si128(state0, mseed2);\n 475 | return state1;\n 476 | }\n 477 | }\n 478 | \n 479 | template <ZeroExtension ZX>\n 480 | static size_t QT_FUNCTION_TARGET(AES) QT_VECTORCALL\n 481 | aeshash128_16to32(__m128i state0, __m128i state1, const __m128i *src, const __m128i *srcend)\n 482 | {\n 483 | {\n 484 | const __m128i *src2 = advance<ZX>(srcend, -1);\n 485 | if (advance<ZX>(src, 1) < srcend) {\n 486 | // epilogue: between 16 and 31 bytes\n 487 | hash2x16bytes<ZX>(state0, state1, src, src2);\n 488 | } else if (src != srcend) {\n 489 | // epilogue: between 1 and 16 bytes, overlap with the end\n 490 | __m128i data = loadu128<ZX>(src2);\n 491 | hash16bytes(state0, data);\n 492 | }\n 493 | \n 494 | // combine results:\n 495 | state0 = _mm_xor_si128(state0, state1);\n 496 | }\n 497 | \n 498 | return mm_cvtsi128_sz(state0);\n 499 | }\n 500 | \n 501 | // load all 16 bytes and mask off the bytes past the end of the source\n 502 | static const qint8 maskarray[] = {\n 503 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n 504 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 505 | };\n 506 | \n 507 | // load 16 bytes ending at the data end, then shuffle them to the beginning\n 508 | static const qint8 shufflecontrol[] = {\n 509 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 510 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1\n 511 | };\n 512 | \n 513 | template <ZeroExtension ZX>\n 514 | static size_t QT_FUNCTION_TARGET(AES) QT_VECTORCALL\n 515 | aeshash128_lt16(__m128i state0, const __m128i *src, const __m128i *srcend, size_t len)\n 516 | {\n 517 | if (len) {\n 518 | // We're going to load 16 bytes and mask zero the part we don't care\n 519 | // (the hash of a short string is different from the hash of a longer\n 520 | // including NULLs at the end because the length is in the key)\n 521 | // WARNING: this may produce valgrind warnings, but it's safe\n 522 | \n 523 | constexpr quintptr CachelineSize = 64;\n 524 | __m128i data;\n 525 | \n> 526 | if ((quintptr(src) & (CachelineSize / 2)) == 0) {\n 527 | // lower half of the cacheline:\n 528 | __m128i mask = _mm_loadu_si128(reinterpret_cast<const __m128i *>(maskarray + 15 - len));\n 529 | data = loadu128<ZX>(src);\n 530 | data = _mm_and_si128(data, mask);\n 531 | } else {\n 532 | // upper half of the cacheline:\n 533 | __m128i control = _mm_loadu_si128(reinterpret_cast<const __m128i *>(shufflecontrol + 15 - len));\n 534 | data = loadu128<ZX>(advance<ZX>(srcend, -1));\n 535 | data = _mm_shuffle_epi8(data, control);\n 536 | }\n 537 | \n 538 | hash16bytes(state0, data);\n 539 | }\n 540 | return mm_cvtsi128_sz(state0);\n 541 | }\n 542 | \n 543 | template <ZeroExtension ZX>\n 544 | static size_t QT_FUNCTION_TARGET(AES) QT_VECTORCALL\n 545 | aeshash128_ge32(__m128i state0, __m128i state1, const __m128i *src, const __m128i *srcend)\n 546 | {\n 547 | // main loop: scramble two 16-byte blocks\n 548 | for ( ; advance<ZX>(src, 2) < srcend; src = advance<ZX>(src, 2))\n 549 | hash2x16bytes<ZX>(state0, state1, src, advance<ZX>(src, 1));\n 550 | \n 551 | return aeshash128_16to32<ZX>(state0, state1, src, srcend);\n 552 | }\n 553 | \n 554 | # if QT_COMPILER_SUPPORTS_HERE(VAES)\n 555 | template <ZeroExtension> static __m256i loadu256(const void *ptr);\n 556 | template <> Q_ALWAYS_INLINE QT_FUNCTION_TARGET(VAES) __m256i loadu256<None>(const void *ptr)\n 557 | {\n 558 | return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(ptr));\n 559 | }\n 560 | template <> Q_ALWAYS_INLINE QT_FUNCTION_TARGET(VAES) __m256i loadu256<ByteToWord>(const void *ptr)\n 561 | {\n 562 | // VPMOVZXBW xmm, ymm\n 563 | __m128i data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr));\n 564 | return _mm256_cvtepu8_epi16(data);\n 565 | }\n 566 | \n 567 | template <ZeroExtension ZX>\n 568 | static size_t QT_FUNCTION_TARGET(VAES_AVX512) QT_VECTORCALL\n 569 | aeshash256_lt32_avx256(__m256i state0, const uchar *p, size_t len)\n 570 | {\n 571 | __m128i state0_128 = _mm256_castsi256_si128(state0);\n 572 | if (len) {\n 573 | __m256i data;\n 574 | if constexpr (ZX == None) {\n 575 | __mmask32 mask = _bzhi_u32(-1, unsigned(len));\n 576 | data = _mm256_maskz_loadu_epi8(mask, p);\n 577 | } else {\n 578 | __mmask16 mask = _bzhi_u32(-1, unsigned(len) / 2);\n 579 | __m128i data0 = _mm_maskz_loadu_epi8(mask, p);\n 580 | data = _mm256_cvtepu8_epi16(data0);\n 581 | }\n 582 | __m128i data0 = _mm256_castsi256_si128(data);\n 583 | if (len >= sizeof(__m128i)) {\n 584 | state0 = _mm256_xor_si256(state0, data);\n 585 | state0 = _mm256_aesenc_epi128(state0, state0);\n 586 | state0 = _mm256_aesenc_epi128(state0, state0);\n 587 | // we're XOR'ing the two halves so we skip the third AESENC\n 588 | // state0 = _mm256_aesenc_epi128(state0, state0);\n 589 | \n 590 | // XOR the two halves and extract\n 591 | __m128i low = _mm256_extracti128_si256(state0, 0);\n 592 | __m128i high = _mm256_extracti128_si256(state0, 1);\n 593 | state0_128 = _mm_xor_si128(low, high);\n 594 | } else {\n 595 | hash16bytes(state0_128, data0);\n 596 | }\n 597 | }\n 598 | return mm_cvtsi128_sz(state0_128);\n 599 | }\n 600 | \n 601 | template <ZeroExtension ZX>\n 602 | static size_t QT_FUNCTION_TARGET(VAES) QT_VECTORCALL\n 603 | aeshash256_ge32(__m256i state0, const __m128i *s, const __m128i *end, size_t len)\n 604 | {\n 605 | static const auto hash32bytes = [](__m256i &state0, __m256i data) QT_FUNCTION_TARGET(VAES) {\n 606 | state0 = _mm256_xor_si256(state0, data);\n 607 | state0 = _mm256_aesenc_epi128(state0, state0);\n 608 | state0 = _mm256_aesenc_epi128(state0, state0);\n 609 | state0 = _mm256_aesenc_epi128(state0, state0);\n 610 | };\n 611 | \n 612 | // hash twice 32 bytes, running 2 scramble rounds of AES on itself\n 613 | const auto hash2x32bytes = [](__m256i &state0, __m256i &state1, const void *src0,\n 614 | const void *src1) QT_FUNCTION_TARGET(VAES) {\n 615 | __m256i data0 = loadu256<ZX>(src0);\n 616 | __m256i data1 = loadu256<ZX>(src1);\n 617 | state0 = _mm256_xor_si256(data0, state0);\n 618 | state1 = _mm256_xor_si256(data1, state1);\n 619 | state0 = _mm256_aesenc_epi128(state0, state0);\n 620 | state1 = _mm256_aesenc_epi128(state1, state1);\n 621 | state0 = _mm256_aesenc_epi128(state0, state0);\n 622 | state1 = _mm256_aesenc_epi128(state1, state1);\n 623 | };\n 624 | \n 625 | const __m256i *src = reinterpret_cast<const __m256i *>(s);\n 626 | const __m256i *srcend = reinterpret_cast<const __m256i *>(end);", "src_commits": "[{\"path\":\"/src/extra-cmake-modules\",\"rev\":\"785cc769097051335412b1df5ef8b784112e18d1\",\"url\":\"https://invent.kde.org/frameworks/extra-cmake-modules.git\"},{\"path\":\"/src/karchive\",\"rev\":\"3557ad6e4aeb96ec1b6705f43cc3dcb96d76cd6c\",\"url\":\"https://invent.kde.org/frameworks/karchive.git\"},{\"path\":\"/src/openssl\",\"rev\":\"69e54bee8d89f6703eaeca5f4c8b6a8822161c64\",\"url\":\"https://github.com/openssl/openssl.git\"},{\"path\":\"/src/qtbase\",\"rev\":\"e40473cf5458f18d6321da0fdb82ed18465a3bd8\",\"url\":\"git://code.qt.io/qt/qtbase.git\"},{\"path\":\"/src/xz\",\"rev\":\"ebb0e6789cefe3be71756881aa8f2009fda9938c\",\"url\":\"https://github.com/tukaani-project/xz.git\"},{\"path\":\"/src/zlib\",\"rev\":\"f9dd6009be3ed32415edf1e89d1bc38380ecb95d\",\"url\":\"https://github.com/madler/zlib.git\"},{\"path\":\"/src/zstd\",\"rev\":\"0cdce55f2fbf02990df8681eedb76e32f804fcc8\",\"url\":\"https://github.com/facebook/zstd.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"karchive_fuzzer\",\"kcompressiondevice_fuzzer\"]", "cnt": 7600000, "coverage_keys": "[\"/src/qtbase/src/corelib/tools/qhash.cpp\"]", "target_text": "Reach line at /src/qtbase/src/corelib/tools/qhash.cpp:526 (observed count 7600000).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-karchive:v2026-07-test1@sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_digest": "sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "liboqs:merged:src/liboqs/src/common/common.c:414", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "liboqs", "harness": "merged", "harness_binaries": "[\"fuzz_test_kem\", \"fuzz_test_sig\", \"fuzz_test_sig_stfl_lms\", \"fuzz_test_sig_stfl_xmss\"]", "language": "c", "file": "/src/liboqs/src/common/common.c", "line_start": 414, "line_end": 414, "line_count": 1, "function": "", "source_snippet": " 314 | \t}\n 315 | \tconst size_t offset = alignment - 1 + sizeof(uint8_t);\n 316 | \tuint8_t *buffer = OSSL_FUNC(CRYPTO_malloc)(size + offset, OPENSSL_FILE, OPENSSL_LINE);\n 317 | \tif (!buffer) {\n 318 | \t\treturn NULL;\n 319 | \t}\n 320 | \tuint8_t *ptr = (uint8_t *)(((uintptr_t)(buffer) + offset) & ~(alignment - 1));\n 321 | \tptrdiff_t diff = ptr - buffer;\n 322 | \tif (diff > UINT8_MAX) {\n 323 | \t\t// Free and return NULL if alignment is too large\n 324 | \t\tOSSL_FUNC(CRYPTO_free)(buffer, OPENSSL_FILE, OPENSSL_LINE);\n 325 | \t\terrno = EINVAL;\n 326 | \t\treturn NULL;\n 327 | \t}\n 328 | \t// Store the difference so that the free function can use it\n 329 | \tptr[-1] = (uint8_t)diff;\n 330 | \treturn ptr;\n 331 | #elif defined(OQS_HAVE_ALIGNED_ALLOC) // glibc and other implementations providing aligned_alloc\n 332 | \treturn aligned_alloc(alignment, size);\n 333 | #else\n 334 | \t// Check alignment (power of 2, and >= sizeof(void*)) and size (multiple of alignment)\n 335 | \tif (alignment & (alignment - 1) || size & (alignment - 1) || alignment < sizeof(void *)) {\n 336 | \t\terrno = EINVAL;\n 337 | \t\treturn NULL;\n 338 | \t}\n 339 | \n 340 | #if defined(OQS_HAVE_POSIX_MEMALIGN)\n 341 | \tvoid *ptr = NULL;\n 342 | \tconst int err = posix_memalign(&ptr, alignment, size);\n 343 | \tif (err) {\n 344 | \t\terrno = err;\n 345 | \t\tptr = NULL;\n 346 | \t}\n 347 | \treturn ptr;\n 348 | #elif defined(OQS_HAVE_MEMALIGN)\n 349 | \treturn memalign(alignment, size);\n 350 | #elif defined(__MINGW32__) || defined(__MINGW64__)\n 351 | \treturn __mingw_aligned_malloc(size, alignment);\n 352 | #elif defined(_MSC_VER)\n 353 | \treturn _aligned_malloc(size, alignment);\n 354 | #else\n 355 | \tif (!size) {\n 356 | \t\treturn NULL;\n 357 | \t}\n 358 | \t// Overallocate to be able to align the pointer (alignment -1) and to store\n 359 | \t// the difference between the pointer returned to the user (ptr) and the\n 360 | \t// pointer returned by malloc (buffer). The difference is caped to 255 and\n 361 | \t// can be made larger if necessary, but this should be enough for all users\n 362 | \t// in liboqs.\n 363 | \t//\n 364 | \t// buffer ptr\n 365 | \t// \u2193 \u2193\n 366 | \t// ...........|...................\n 367 | \t// |\n 368 | \t// diff = ptr - buffer\n 369 | \tconst size_t offset = alignment - 1 + sizeof(uint8_t);\n 370 | \tuint8_t *buffer = malloc(size + offset); // IGNORE memory-check\n 371 | \tif (!buffer) {\n 372 | \t\treturn NULL;\n 373 | \t}\n 374 | \n 375 | \t// Align the pointer returned to the user.\n 376 | \tuint8_t *ptr = (uint8_t *)(((uintptr_t)(buffer) + offset) & ~(alignment - 1));\n 377 | \tptrdiff_t diff = ptr - buffer;\n 378 | \tif (diff > UINT8_MAX) {\n 379 | \t\t// This should never happen in our code, but just to be safe\n 380 | \t\tfree(buffer); // IGNORE memory-check\n 381 | \t\terrno = EINVAL;\n 382 | \t\treturn NULL;\n 383 | \t}\n 384 | \t// Store the difference one byte ahead the returned poitner so that free\n 385 | \t// can reconstruct buffer.\n 386 | \tptr[-1] = diff;\n 387 | \treturn ptr;\n 388 | #endif\n 389 | #endif\n 390 | }\n 391 | \n 392 | void OQS_MEM_aligned_free(void *ptr) {\n 393 | \tif (ptr == NULL) {\n 394 | \t\treturn;\n 395 | \t}\n 396 | #if defined(OQS_USE_OPENSSL)\n 397 | \t// Use OpenSSL's free function\n 398 | \tuint8_t *u8ptr = ptr;\n 399 | \tOSSL_FUNC(CRYPTO_free)(u8ptr - u8ptr[-1], OPENSSL_FILE, OPENSSL_LINE);\n 400 | #elif defined(OQS_HAVE_ALIGNED_ALLOC) || defined(OQS_HAVE_POSIX_MEMALIGN) || defined(OQS_HAVE_MEMALIGN)\n 401 | \tfree(ptr); // IGNORE memory-check\n 402 | #elif defined(__MINGW32__) || defined(__MINGW64__)\n 403 | \t__mingw_aligned_free(ptr);\n 404 | #elif defined(_MSC_VER)\n 405 | \t_aligned_free(ptr);\n 406 | #else\n 407 | \t// Reconstruct the pointer returned from malloc using the difference\n 408 | \t// stored one byte ahead of ptr.\n 409 | \tuint8_t *u8ptr = ptr;\n 410 | \tfree(u8ptr - u8ptr[-1]); // IGNORE memory-check\n 411 | #endif\n 412 | }\n 413 | \n> 414 | void OQS_MEM_aligned_secure_free(void *ptr, size_t len) {\n 415 | \tOQS_MEM_cleanse(ptr, len);\n 416 | \tOQS_MEM_aligned_free(ptr);\n 417 | }\n 418 | \n 419 | OQS_API void *OQS_MEM_malloc(size_t size) {\n 420 | #if defined(OQS_USE_OPENSSL)\n 421 | \treturn OSSL_FUNC(CRYPTO_malloc)(size, OPENSSL_FILE, OPENSSL_LINE);\n 422 | #else\n 423 | \treturn malloc(size); // IGNORE memory-check\n 424 | #endif\n 425 | }\n 426 | \n 427 | OQS_API void *OQS_MEM_calloc(size_t num_elements, size_t element_size) {\n 428 | #if defined(OQS_USE_OPENSSL)\n 429 | \tif (element_size != 0 && num_elements > SIZE_MAX / element_size) {\n 430 | \t\treturn NULL;\n 431 | \t}\n 432 | \treturn OSSL_FUNC(CRYPTO_zalloc)(num_elements * element_size,\n 433 | \t OPENSSL_FILE, OPENSSL_LINE);\n 434 | #else\n 435 | \treturn calloc(num_elements, element_size); // IGNORE memory-check\n 436 | #endif\n 437 | }\n 438 | \n 439 | OQS_API char *OQS_MEM_strdup(const char *str) {\n 440 | #if defined(OQS_USE_OPENSSL)\n 441 | \treturn OSSL_FUNC(CRYPTO_strdup)(str, OPENSSL_FILE, OPENSSL_LINE);\n 442 | #elif defined(OQS_EMBEDDED_BUILD)\n 443 | \tsize_t len = strlen(str) + 1;\n 444 | \tchar *dup = (char *)malloc(len); // IGNORE memory-check\n 445 | \tif (dup != NULL) {\n 446 | \t\tmemcpy(dup, str, len);\n 447 | \t}\n 448 | \treturn dup;\n 449 | #else\n 450 | \treturn strdup(str); // IGNORE memory-check\n 451 | #endif\n 452 | }", "src_commits": "[{\"path\":\"/src/liboqs\",\"rev\":\"0e325ccc2d96d37e7433ff8938550d8111b3931c\",\"url\":\"https://github.com/open-quantum-safe/liboqs.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_test_kem\",\"fuzz_test_sig\",\"fuzz_test_sig_stfl_lms\",\"fuzz_test_sig_stfl_xmss\"]", "cnt": 2850000, "coverage_keys": "[\"/src/liboqs/src/common/common.c\"]", "target_text": "Reach line at /src/liboqs/src/common/common.c:414 (observed count 2850000).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-liboqs:v2026-07-test1@sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_digest": "sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner:ubuntu-24-04", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "liboqs:merged:src/liboqs/src/kem/bike/additional_r4/sampling_avx2.c:57", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "liboqs", "harness": "merged", "harness_binaries": "[\"fuzz_test_kem\", \"fuzz_test_sig\", \"fuzz_test_sig_stfl_lms\", \"fuzz_test_sig_stfl_xmss\"]", "language": "c", "file": "/src/liboqs/src/kem/bike/additional_r4/sampling_avx2.c", "line_start": 57, "line_end": 57, "line_count": 1, "function": "", "source_snippet": " 1 | /* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n 2 | * SPDX-License-Identifier: Apache-2.0\"\n 3 | *\n 4 | * Written by Nir Drucker, Shay Gueron and Dusan Kostic,\n 5 | * AWS Cryptographic Algorithms Group.\n 6 | */\n 7 | \n 8 | #include <assert.h>\n 9 | \n 10 | #include \"sampling_internal.h\"\n 11 | \n 12 | #define AVX2_INTERNAL\n 13 | #include \"x86_64_intrinsic.h\"\n 14 | \n 15 | // For improved performance, we process NUM_YMMS amount of data in parallel.\n 16 | #define NUM_YMMS (4)\n 17 | #define YMMS_QWORDS (QWORDS_IN_YMM * NUM_YMMS)\n 18 | \n 19 | void secure_set_bits_avx2(OUT pad_r_t * r,\n 20 | IN const size_t first_pos,\n 21 | IN const idx_t *wlist,\n 22 | IN const size_t w_size)\n 23 | {\n 24 | // The function assumes that the size of r is a multiple\n 25 | // of the cumulative size of used YMM registers.\n 26 | assert((sizeof(*r) / sizeof(uint64_t)) % YMMS_QWORDS == 0);\n 27 | \n 28 | // va vectors hold the bits of the output array \"r\"\n 29 | // va_pos_qw vectors hold the qw position indices of \"r\"\n 30 | // The algorithm works as follows:\n 31 | // 1. Initialize va_pos_qw with starting positions of qw's of \"r\"\n 32 | // va_pos_qw = (3, 2, 1, 0);\n 33 | // 2. While the size of \"r\" is not exceeded:\n 34 | // 3. For each w in wlist:\n 35 | // 4. Compare the pos_qw of w with positions in va_pos_qw\n 36 | // and for the position which is equal set the appropriate\n 37 | // bit in va vector.\n 38 | // 5. Set va_pos_qw to the next qw positions of \"r\"\n 39 | __m256i va[NUM_YMMS], va_pos_qw[NUM_YMMS], va_mask;\n 40 | __m256i w_pos_qw, w_pos_bit;\n 41 | __m256i one, inc;\n 42 | \n 43 | uint64_t *r64 = (uint64_t *)r;\n 44 | \n 45 | one = SET1_I64(1);\n 46 | inc = SET1_I64(QWORDS_IN_YMM);\n 47 | \n 48 | // 1. Initialize\n 49 | va_pos_qw[0] = SET_I64(3, 2, 1, 0);\n 50 | for(size_t i = 1; i < NUM_YMMS; i++) {\n 51 | va_pos_qw[i] = ADD_I64(va_pos_qw[i - 1], inc);\n 52 | }\n 53 | \n 54 | // va_pos_qw vectors hold qw positions 0 .. (NUM_YMMS * QWORDS_IN_YMM - 1)\n 55 | // Therefore, we set the increment vector inc such that by adding it to\n 56 | // va_pos_qw vectors, they hold the next YMM_QWORDS qw positions.\n> 57 | inc = SET1_I64(YMMS_QWORDS);\n 58 | \n 59 | for(size_t i = 0; i < (sizeof(*r) / sizeof(uint64_t)); i += YMMS_QWORDS) {\n 60 | for(size_t va_iter = 0; va_iter < NUM_YMMS; va_iter++) {\n 61 | va[va_iter] = SET_ZERO;\n 62 | }\n 63 | \n 64 | for(size_t w_iter = 0; w_iter < w_size; w_iter++) {\n 65 | int32_t w = wlist[w_iter] - first_pos;\n 66 | w_pos_qw = SET1_I64(w >> 6);\n 67 | w_pos_bit = SLLI_I64(one, w & MASK(6));\n 68 | \n 69 | // 4. Compare the positions in va_pos_qw with w_pos_qw\n 70 | // and set the appropriate bit in va\n 71 | for(size_t va_iter = 0; va_iter < NUM_YMMS; va_iter++) {\n 72 | va_mask = CMPEQ_I64(va_pos_qw[va_iter], w_pos_qw);\n 73 | va[va_iter] |= (va_mask & w_pos_bit);\n 74 | }\n 75 | }\n 76 | \n 77 | // 5. Set the va_pos_qw to the next qw positions of r\n 78 | // and store the previously computed data in r\n 79 | for(size_t va_iter = 0; va_iter < NUM_YMMS; va_iter++) {\n 80 | STORE(&r64[i + (va_iter * QWORDS_IN_YMM)], va[va_iter]);\n 81 | va_pos_qw[va_iter] = ADD_I64(va_pos_qw[va_iter], inc);\n 82 | }\n 83 | }\n 84 | }\n 85 | ", "src_commits": "[{\"path\":\"/src/liboqs\",\"rev\":\"0e325ccc2d96d37e7433ff8938550d8111b3931c\",\"url\":\"https://github.com/open-quantum-safe/liboqs.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_test_kem\",\"fuzz_test_sig\"]", "cnt": 84, "coverage_keys": "[\"/src/liboqs/src/kem/bike/additional_r4/sampling_avx2.c\"]", "target_text": "Reach line at /src/liboqs/src/kem/bike/additional_r4/sampling_avx2.c:57 (observed count 84).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-liboqs:v2026-07-test1@sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_digest": "sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner:ubuntu-24-04", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "liboqs:merged:src/liboqs/src/common/sha3/sha3.c:60", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "liboqs", "harness": "merged", "harness_binaries": "[\"fuzz_test_kem\", \"fuzz_test_sig\", \"fuzz_test_sig_stfl_lms\", \"fuzz_test_sig_stfl_xmss\"]", "language": "c", "file": "/src/liboqs/src/common/sha3/sha3.c", "line_start": 60, "line_end": 60, "line_count": 1, "function": "", "source_snippet": " 1 | // SPDX-License-Identifier: MIT\n 2 | \n 3 | #include <oqs/oqs.h>\n 4 | \n 5 | #include \"sha3.h\"\n 6 | \n 7 | extern struct OQS_SHA3_callbacks sha3_default_callbacks;\n 8 | \n 9 | static struct OQS_SHA3_callbacks *callbacks = &sha3_default_callbacks;\n 10 | \n 11 | OQS_API void OQS_SHA3_set_callbacks(struct OQS_SHA3_callbacks *new_callbacks) {\n 12 | \tcallbacks = new_callbacks;\n 13 | }\n 14 | \n 15 | void OQS_SHA3_sha3_256(uint8_t *output, const uint8_t *input, size_t inplen) {\n 16 | \tcallbacks->SHA3_sha3_256(output, input, inplen);\n 17 | }\n 18 | \n 19 | void OQS_SHA3_sha3_256_inc_init(OQS_SHA3_sha3_256_inc_ctx *state) {\n 20 | \tcallbacks->SHA3_sha3_256_inc_init(state);\n 21 | }\n 22 | \n 23 | void OQS_SHA3_sha3_256_inc_absorb(OQS_SHA3_sha3_256_inc_ctx *state, const uint8_t *input, size_t inlen) {\n 24 | \tcallbacks->SHA3_sha3_256_inc_absorb(state, input, inlen);\n 25 | }\n 26 | \n 27 | void OQS_SHA3_sha3_256_inc_finalize(uint8_t *output, OQS_SHA3_sha3_256_inc_ctx *state) {\n 28 | \tcallbacks->SHA3_sha3_256_inc_finalize(output, state);\n 29 | }\n 30 | \n 31 | void OQS_SHA3_sha3_256_inc_ctx_release(OQS_SHA3_sha3_256_inc_ctx *state) {\n 32 | \tcallbacks->SHA3_sha3_256_inc_ctx_release(state);\n 33 | }\n 34 | \n 35 | void OQS_SHA3_sha3_256_inc_ctx_reset(OQS_SHA3_sha3_256_inc_ctx *state) {\n 36 | \tcallbacks->SHA3_sha3_256_inc_ctx_reset(state);\n 37 | }\n 38 | \n 39 | void OQS_SHA3_sha3_256_inc_ctx_clone(OQS_SHA3_sha3_256_inc_ctx *dest, const OQS_SHA3_sha3_256_inc_ctx *src) {\n 40 | \tcallbacks->SHA3_sha3_256_inc_ctx_clone(dest, src);\n 41 | }\n 42 | \n 43 | void OQS_SHA3_sha3_384(uint8_t *output, const uint8_t *input, size_t inplen) {\n 44 | \tcallbacks->SHA3_sha3_384(output, input, inplen);\n 45 | }\n 46 | \n 47 | void OQS_SHA3_sha3_384_inc_init(OQS_SHA3_sha3_384_inc_ctx *state) {\n 48 | \tcallbacks->SHA3_sha3_384_inc_init(state);\n 49 | }\n 50 | \n 51 | void OQS_SHA3_sha3_384_inc_absorb(OQS_SHA3_sha3_384_inc_ctx *state, const uint8_t *input, size_t inlen) {\n 52 | \tcallbacks->SHA3_sha3_384_inc_absorb(state, input, inlen);\n 53 | }\n 54 | \n 55 | void OQS_SHA3_sha3_384_inc_finalize(uint8_t *output, OQS_SHA3_sha3_384_inc_ctx *state) {\n 56 | \tcallbacks->SHA3_sha3_384_inc_finalize(output, state);\n 57 | }\n 58 | \n 59 | void OQS_SHA3_sha3_384_inc_ctx_release(OQS_SHA3_sha3_384_inc_ctx *state) {\n> 60 | \tcallbacks->SHA3_sha3_384_inc_ctx_release(state);\n 61 | }\n 62 | \n 63 | void OQS_SHA3_sha3_384_inc_ctx_reset(OQS_SHA3_sha3_384_inc_ctx *state) {\n 64 | \tcallbacks->SHA3_sha3_384_inc_ctx_reset(state);\n 65 | }\n 66 | \n 67 | void OQS_SHA3_sha3_384_inc_ctx_clone(OQS_SHA3_sha3_384_inc_ctx *dest, const OQS_SHA3_sha3_384_inc_ctx *src) {\n 68 | \tcallbacks->SHA3_sha3_384_inc_ctx_clone(dest, src);\n 69 | }\n 70 | \n 71 | void OQS_SHA3_sha3_512(uint8_t *output, const uint8_t *input, size_t inplen) {\n 72 | \tcallbacks->SHA3_sha3_512(output, input, inplen);\n 73 | }\n 74 | \n 75 | void OQS_SHA3_sha3_512_inc_init(OQS_SHA3_sha3_512_inc_ctx *state) {\n 76 | \tcallbacks->SHA3_sha3_512_inc_init(state);\n 77 | }\n 78 | \n 79 | void OQS_SHA3_sha3_512_inc_absorb(OQS_SHA3_sha3_512_inc_ctx *state, const uint8_t *input, size_t inlen) {\n 80 | \tcallbacks->SHA3_sha3_512_inc_absorb(state, input, inlen);\n 81 | }\n 82 | \n 83 | void OQS_SHA3_sha3_512_inc_finalize(uint8_t *output, OQS_SHA3_sha3_512_inc_ctx *state) {\n 84 | \tcallbacks->SHA3_sha3_512_inc_finalize(output, state);\n 85 | }\n 86 | \n 87 | void OQS_SHA3_sha3_512_inc_ctx_release(OQS_SHA3_sha3_512_inc_ctx *state) {\n 88 | \tcallbacks->SHA3_sha3_512_inc_ctx_release(state);\n 89 | }\n 90 | \n 91 | void OQS_SHA3_sha3_512_inc_ctx_reset(OQS_SHA3_sha3_512_inc_ctx *state) {\n 92 | \tcallbacks->SHA3_sha3_512_inc_ctx_reset(state);\n 93 | }\n 94 | \n 95 | void OQS_SHA3_sha3_512_inc_ctx_clone(OQS_SHA3_sha3_512_inc_ctx *dest, const OQS_SHA3_sha3_512_inc_ctx *src) {\n 96 | \tcallbacks->SHA3_sha3_512_inc_ctx_clone(dest, src);\n 97 | }\n 98 | \n 99 | void OQS_SHA3_shake128(uint8_t *output, size_t outlen, const uint8_t *input, size_t inplen) {\n 100 | \tcallbacks->SHA3_shake128(output, outlen, input, inplen);\n 101 | }\n 102 | \n 103 | void OQS_SHA3_shake128_inc_init(OQS_SHA3_shake128_inc_ctx *state) {\n 104 | \tcallbacks->SHA3_shake128_inc_init(state);\n 105 | }\n 106 | \n 107 | void OQS_SHA3_shake128_inc_absorb(OQS_SHA3_shake128_inc_ctx *state, const uint8_t *input, size_t inlen) {\n 108 | \tcallbacks->SHA3_shake128_inc_absorb(state, input, inlen);\n 109 | }\n 110 | \n 111 | void OQS_SHA3_shake128_inc_finalize(OQS_SHA3_shake128_inc_ctx *state) {\n 112 | \tcallbacks->SHA3_shake128_inc_finalize(state);\n 113 | }\n 114 | \n 115 | void OQS_SHA3_shake128_inc_squeeze(uint8_t *output, size_t outlen, OQS_SHA3_shake128_inc_ctx *state) {\n 116 | \tcallbacks->SHA3_shake128_inc_squeeze(output, outlen, state);\n 117 | }\n 118 | \n 119 | void OQS_SHA3_shake128_inc_ctx_release(OQS_SHA3_shake128_inc_ctx *state) {\n 120 | \tcallbacks->SHA3_shake128_inc_ctx_release(state);\n 121 | }\n 122 | \n 123 | void OQS_SHA3_shake128_inc_ctx_clone(OQS_SHA3_shake128_inc_ctx *dest, const OQS_SHA3_shake128_inc_ctx *src) {\n 124 | \tcallbacks->SHA3_shake128_inc_ctx_clone(dest, src);\n 125 | }\n 126 | \n 127 | void OQS_SHA3_shake128_inc_ctx_reset(OQS_SHA3_shake128_inc_ctx *state) {\n 128 | \tcallbacks->SHA3_shake128_inc_ctx_reset(state);\n 129 | }\n 130 | \n 131 | void OQS_SHA3_shake256(uint8_t *output, size_t outlen, const uint8_t *input, size_t inplen) {\n 132 | \tcallbacks->SHA3_shake256(output, outlen, input, inplen);\n 133 | }\n 134 | \n 135 | void OQS_SHA3_shake256_inc_init(OQS_SHA3_shake256_inc_ctx *state) {\n 136 | \tcallbacks->SHA3_shake256_inc_init(state);\n 137 | }\n 138 | \n 139 | void OQS_SHA3_shake256_inc_absorb(OQS_SHA3_shake256_inc_ctx *state, const uint8_t *input, size_t inlen) {\n 140 | \tcallbacks->SHA3_shake256_inc_absorb(state, input, inlen);\n 141 | }\n 142 | \n 143 | void OQS_SHA3_shake256_inc_finalize(OQS_SHA3_shake256_inc_ctx *state) {\n 144 | \tcallbacks->SHA3_shake256_inc_finalize(state);\n 145 | }\n 146 | \n 147 | void OQS_SHA3_shake256_inc_squeeze(uint8_t *output, size_t outlen, OQS_SHA3_shake256_inc_ctx *state) {\n 148 | \tcallbacks->SHA3_shake256_inc_squeeze(output, outlen, state);\n 149 | }\n 150 | \n 151 | void OQS_SHA3_shake256_inc_ctx_release(OQS_SHA3_shake256_inc_ctx *state) {\n 152 | \tcallbacks->SHA3_shake256_inc_ctx_release(state);\n 153 | }\n 154 | \n 155 | void OQS_SHA3_shake256_inc_ctx_clone(OQS_SHA3_shake256_inc_ctx *dest, const OQS_SHA3_shake256_inc_ctx *src) {\n 156 | \tcallbacks->SHA3_shake256_inc_ctx_clone(dest, src);\n 157 | }\n 158 | \n 159 | void OQS_SHA3_shake256_inc_ctx_reset(OQS_SHA3_shake256_inc_ctx *state) {\n 160 | \tcallbacks->SHA3_shake256_inc_ctx_reset(state);", "src_commits": "[{\"path\":\"/src/liboqs\",\"rev\":\"0e325ccc2d96d37e7433ff8938550d8111b3931c\",\"url\":\"https://github.com/open-quantum-safe/liboqs.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_test_kem\"]", "cnt": 28, "coverage_keys": "[\"/src/liboqs/src/common/sha3/sha3.c\"]", "target_text": "Reach line at /src/liboqs/src/common/sha3/sha3.c:60 (observed count 28).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-liboqs:v2026-07-test1@sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_digest": "sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner:ubuntu-24-04", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "liboqs:merged:src/liboqs/src/common/sha3/xkcp_sha3x4.c:189", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "liboqs", "harness": "merged", "harness_binaries": "[\"fuzz_test_kem\", \"fuzz_test_sig\", \"fuzz_test_sig_stfl_lms\", \"fuzz_test_sig_stfl_xmss\"]", "language": "c", "file": "/src/liboqs/src/common/sha3/xkcp_sha3x4.c", "line_start": 189, "line_end": 189, "line_count": 1, "function": "", "source_snippet": " 89 | const uint8_t *in0, const uint8_t *in1, const uint8_t *in2, const uint8_t *in3, size_t inlen) {\n 90 | \tuint64_t c = r - s[100];\n 91 | \n 92 | \tif (s[100] && inlen >= c) {\n 93 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 0, in0, (unsigned int)s[100], (unsigned int)c);\n 94 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 1, in1, (unsigned int)s[100], (unsigned int)c);\n 95 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 2, in2, (unsigned int)s[100], (unsigned int)c);\n 96 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 3, in3, (unsigned int)s[100], (unsigned int)c);\n 97 | \t\t(*Keccak_X4_Permute_ptr)(s);\n 98 | \t\tinlen -= c;\n 99 | \t\tin0 += c;\n 100 | \t\tin1 += c;\n 101 | \t\tin2 += c;\n 102 | \t\tin3 += c;\n 103 | \t\ts[100] = 0;\n 104 | \t}\n 105 | \n 106 | \twhile (inlen >= r) {\n 107 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 0, in0, 0, (unsigned int)r);\n 108 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 1, in1, 0, (unsigned int)r);\n 109 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 2, in2, 0, (unsigned int)r);\n 110 | \t\t(*Keccak_X4_AddBytes_ptr)(s, 3, in3, 0, (unsigned int)r);\n 111 | \t\t(*Keccak_X4_Permute_ptr)(s);\n 112 | \t\tinlen -= r;\n 113 | \t\tin0 += r;\n 114 | \t\tin1 += r;\n 115 | \t\tin2 += r;\n 116 | \t\tin3 += r;\n 117 | \t}\n 118 | \n 119 | \t(*Keccak_X4_AddBytes_ptr)(s, 0, in0, (unsigned int)s[100], (unsigned int)inlen);\n 120 | \t(*Keccak_X4_AddBytes_ptr)(s, 1, in1, (unsigned int)s[100], (unsigned int)inlen);\n 121 | \t(*Keccak_X4_AddBytes_ptr)(s, 2, in2, (unsigned int)s[100], (unsigned int)inlen);\n 122 | \t(*Keccak_X4_AddBytes_ptr)(s, 3, in3, (unsigned int)s[100], (unsigned int)inlen);\n 123 | \ts[100] += inlen;\n 124 | }\n 125 | \n 126 | static void keccak_x4_inc_finalize(uint64_t *s, uint32_t r, uint8_t p) {\n 127 | \t(*Keccak_X4_AddByte_ptr)(s, 0, p, (unsigned int)s[100]);\n 128 | \t(*Keccak_X4_AddByte_ptr)(s, 1, p, (unsigned int)s[100]);\n 129 | \t(*Keccak_X4_AddByte_ptr)(s, 2, p, (unsigned int)s[100]);\n 130 | \t(*Keccak_X4_AddByte_ptr)(s, 3, p, (unsigned int)s[100]);\n 131 | \n 132 | \t(*Keccak_X4_AddByte_ptr)(s, 0, 0x80, (unsigned int)(r - 1));\n 133 | \t(*Keccak_X4_AddByte_ptr)(s, 1, 0x80, (unsigned int)(r - 1));\n 134 | \t(*Keccak_X4_AddByte_ptr)(s, 2, 0x80, (unsigned int)(r - 1));\n 135 | \t(*Keccak_X4_AddByte_ptr)(s, 3, 0x80, (unsigned int)(r - 1));\n 136 | \n 137 | \ts[100] = 0;\n 138 | }\n 139 | \n 140 | static void keccak_x4_inc_squeeze(uint8_t *out0, uint8_t *out1, uint8_t *out2, uint8_t *out3,\n 141 | size_t outlen, uint64_t *s, uint32_t r) {\n 142 | \n 143 | \twhile (outlen > s[100]) {\n 144 | \t\t(*Keccak_X4_ExtractBytes_ptr)(s, 0, out0, (unsigned int)(r - s[100]), (unsigned int)s[100]);\n 145 | \t\t(*Keccak_X4_ExtractBytes_ptr)(s, 1, out1, (unsigned int)(r - s[100]), (unsigned int)s[100]);\n 146 | \t\t(*Keccak_X4_ExtractBytes_ptr)(s, 2, out2, (unsigned int)(r - s[100]), (unsigned int)s[100]);\n 147 | \t\t(*Keccak_X4_ExtractBytes_ptr)(s, 3, out3, (unsigned int)(r - s[100]), (unsigned int)s[100]);\n 148 | \t\t(*Keccak_X4_Permute_ptr)(s);\n 149 | \t\tout0 += s[100];\n 150 | \t\tout1 += s[100];\n 151 | \t\tout2 += s[100];\n 152 | \t\tout3 += s[100];\n 153 | \t\toutlen -= s[100];\n 154 | \t\ts[100] = r;\n 155 | \t}\n 156 | \n 157 | \t(*Keccak_X4_ExtractBytes_ptr)(s, 0, out0, (unsigned int)(r - s[100]), (unsigned int)outlen);\n 158 | \t(*Keccak_X4_ExtractBytes_ptr)(s, 1, out1, (unsigned int)(r - s[100]), (unsigned int)outlen);\n 159 | \t(*Keccak_X4_ExtractBytes_ptr)(s, 2, out2, (unsigned int)(r - s[100]), (unsigned int)outlen);\n 160 | \t(*Keccak_X4_ExtractBytes_ptr)(s, 3, out3, (unsigned int)(r - s[100]), (unsigned int)outlen);\n 161 | \n 162 | \ts[100] -= outlen;\n 163 | }\n 164 | \n 165 | /********** SHAKE128 ***********/\n 166 | \n 167 | static void SHA3_shake128_x4(uint8_t *out0, uint8_t *out1, uint8_t *out2, uint8_t *out3, size_t outlen, const uint8_t *in0, const uint8_t *in1, const uint8_t *in2, const uint8_t *in3, size_t inlen) {\n 168 | \tOQS_SHA3_shake128_x4_inc_ctx s;\n 169 | \tOQS_SHA3_shake128_x4_inc_init(&s);\n 170 | \tOQS_SHA3_shake128_x4_inc_absorb(&s, in0, in1, in2, in3, inlen);\n 171 | \tOQS_SHA3_shake128_x4_inc_finalize(&s);\n 172 | \tOQS_SHA3_shake128_x4_inc_squeeze(out0, out1, out2, out3, outlen, &s);\n 173 | \tOQS_SHA3_shake128_x4_inc_ctx_release(&s);\n 174 | }\n 175 | \n 176 | /* SHAKE128 incremental */\n 177 | \n 178 | static void SHA3_shake128_x4_inc_init(OQS_SHA3_shake128_x4_inc_ctx *state) {\n 179 | \tstate->ctx = OQS_MEM_aligned_alloc(KECCAK_X4_CTX_ALIGNMENT, KECCAK_X4_CTX_BYTES);\n 180 | \tOQS_EXIT_IF_NULLPTR(state->ctx, \"SHA3x4\");\n 181 | \tkeccak_x4_inc_reset((uint64_t *)state->ctx);\n 182 | }\n 183 | static void SHA3_shake128_x4_inc_absorb(OQS_SHA3_shake128_x4_inc_ctx *state, const uint8_t *in0, const uint8_t *in1, const uint8_t *in2, const uint8_t *in3, size_t inlen) {\n 184 | \tkeccak_x4_inc_absorb((uint64_t *)state->ctx, OQS_SHA3_SHAKE128_RATE, in0, in1, in2, in3, inlen);\n 185 | }\n 186 | \n 187 | static void SHA3_shake128_x4_inc_finalize(OQS_SHA3_shake128_x4_inc_ctx *state) {\n 188 | \tkeccak_x4_inc_finalize((uint64_t *)state->ctx, OQS_SHA3_SHAKE128_RATE, 0x1F);\n> 189 | }\n 190 | \n 191 | static void SHA3_shake128_x4_inc_squeeze(uint8_t *out0, uint8_t *out1, uint8_t *out2, uint8_t *out3, size_t outlen, OQS_SHA3_shake128_x4_inc_ctx *state) {\n 192 | \tkeccak_x4_inc_squeeze(out0, out1, out2, out3, outlen, (uint64_t *)state->ctx, OQS_SHA3_SHAKE128_RATE);\n 193 | }\n 194 | \n 195 | static void SHA3_shake128_x4_inc_ctx_clone(OQS_SHA3_shake128_x4_inc_ctx *dest, const OQS_SHA3_shake128_x4_inc_ctx *src) {\n 196 | \tmemcpy(dest->ctx, src->ctx, KECCAK_X4_CTX_BYTES);\n 197 | }\n 198 | \n 199 | static void SHA3_shake128_x4_inc_ctx_release(OQS_SHA3_shake128_x4_inc_ctx *state) {\n 200 | \tOQS_MEM_aligned_secure_free(state->ctx, KECCAK_X4_CTX_BYTES);\n 201 | }\n 202 | \n 203 | static void SHA3_shake128_x4_inc_ctx_reset(OQS_SHA3_shake128_x4_inc_ctx *state) {\n 204 | \tkeccak_x4_inc_reset((uint64_t *)state->ctx);\n 205 | }\n 206 | \n 207 | /********** SHAKE256 ***********/\n 208 | \n 209 | static void SHA3_shake256_x4(uint8_t *out0, uint8_t *out1, uint8_t *out2, uint8_t *out3, size_t outlen, const uint8_t *in0, const uint8_t *in1, const uint8_t *in2, const uint8_t *in3, size_t inlen) {\n 210 | \tOQS_SHA3_shake256_x4_inc_ctx s;\n 211 | \tOQS_SHA3_shake256_x4_inc_init(&s);\n 212 | \tOQS_SHA3_shake256_x4_inc_absorb(&s, in0, in1, in2, in3, inlen);\n 213 | \tOQS_SHA3_shake256_x4_inc_finalize(&s);\n 214 | \tOQS_SHA3_shake256_x4_inc_squeeze(out0, out1, out2, out3, outlen, &s);\n 215 | \tOQS_SHA3_shake256_x4_inc_ctx_release(&s);\n 216 | }\n 217 | \n 218 | /* SHAKE256 incremental */\n 219 | \n 220 | static void SHA3_shake256_x4_inc_init(OQS_SHA3_shake256_x4_inc_ctx *state) {\n 221 | \tstate->ctx = OQS_MEM_aligned_alloc(KECCAK_X4_CTX_ALIGNMENT, KECCAK_X4_CTX_BYTES);\n 222 | \tOQS_EXIT_IF_NULLPTR(state->ctx, \"SHA3x4\");\n 223 | \tkeccak_x4_inc_reset((uint64_t *)state->ctx);\n 224 | }\n 225 | \n 226 | static void SHA3_shake256_x4_inc_absorb(OQS_SHA3_shake256_x4_inc_ctx *state, const uint8_t *in0, const uint8_t *in1, const uint8_t *in2, const uint8_t *in3, size_t inlen) {\n 227 | \tkeccak_x4_inc_absorb((uint64_t *)state->ctx, OQS_SHA3_SHAKE256_RATE, in0, in1, in2, in3, inlen);\n 228 | }\n 229 | \n 230 | static void SHA3_shake256_x4_inc_finalize(OQS_SHA3_shake256_x4_inc_ctx *state) {\n 231 | \tkeccak_x4_inc_finalize((uint64_t *)state->ctx, OQS_SHA3_SHAKE256_RATE, 0x1F);\n 232 | }\n 233 | \n 234 | static void SHA3_shake256_x4_inc_squeeze(uint8_t *out0, uint8_t *out1, uint8_t *out2, uint8_t *out3, size_t outlen, OQS_SHA3_shake256_x4_inc_ctx *state) {\n 235 | \tkeccak_x4_inc_squeeze(out0, out1, out2, out3, outlen, (uint64_t *)state->ctx, OQS_SHA3_SHAKE256_RATE);\n 236 | }\n 237 | \n 238 | static void SHA3_shake256_x4_inc_ctx_clone(OQS_SHA3_shake256_x4_inc_ctx *dest, const OQS_SHA3_shake256_x4_inc_ctx *src) {\n 239 | \tmemcpy(dest->ctx, src->ctx, KECCAK_X4_CTX_BYTES);\n 240 | }\n 241 | \n 242 | static void SHA3_shake256_x4_inc_ctx_release(OQS_SHA3_shake256_x4_inc_ctx *state) {\n 243 | \tOQS_MEM_aligned_secure_free(state->ctx, KECCAK_X4_CTX_BYTES);\n 244 | }\n 245 | \n 246 | static void SHA3_shake256_x4_inc_ctx_reset(OQS_SHA3_shake256_x4_inc_ctx *state) {\n 247 | \tkeccak_x4_inc_reset((uint64_t *)state->ctx);\n 248 | }\n 249 | \n 250 | struct OQS_SHA3_x4_callbacks sha3_x4_default_callbacks = {\n 251 | \tSHA3_shake128_x4,\n 252 | \tSHA3_shake128_x4_inc_init,\n 253 | \tSHA3_shake128_x4_inc_absorb,\n 254 | \tSHA3_shake128_x4_inc_finalize,\n 255 | \tSHA3_shake128_x4_inc_squeeze,\n 256 | \tSHA3_shake128_x4_inc_ctx_release,\n 257 | \tSHA3_shake128_x4_inc_ctx_clone,\n 258 | \tSHA3_shake128_x4_inc_ctx_reset,\n 259 | \tSHA3_shake256_x4,\n 260 | \tSHA3_shake256_x4_inc_init,\n 261 | \tSHA3_shake256_x4_inc_absorb,\n 262 | \tSHA3_shake256_x4_inc_finalize,\n 263 | \tSHA3_shake256_x4_inc_squeeze,\n 264 | \tSHA3_shake256_x4_inc_ctx_release,\n 265 | \tSHA3_shake256_x4_inc_ctx_clone,\n 266 | \tSHA3_shake256_x4_inc_ctx_reset,\n 267 | };", "src_commits": "[{\"path\":\"/src/liboqs\",\"rev\":\"0e325ccc2d96d37e7433ff8938550d8111b3931c\",\"url\":\"https://github.com/open-quantum-safe/liboqs.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"fuzz_test_kem\",\"fuzz_test_sig\",\"fuzz_test_sig_stfl_lms\",\"fuzz_test_sig_stfl_xmss\"]", "cnt": 338000, "coverage_keys": "[\"/src/liboqs/src/common/sha3/xkcp_sha3x4.c\"]", "target_text": "Reach line at /src/liboqs/src/common/sha3/xkcp_sha3x4.c:189 (observed count 338000).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-liboqs:v2026-07-test1@sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_digest": "sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner:ubuntu-24-04", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "libraw:merged:src/libraw/src/metadata/canon.cpp:370", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "libraw", "harness": "merged", "harness_binaries": "[\"libraw_cr2_fuzzer\", \"libraw_fuzzer\", \"libraw_nef_fuzzer\", \"libraw_raf_fuzzer\"]", "language": "c++", "file": "/src/libraw/src/metadata/canon.cpp", "line_start": 370, "line_end": 370, "line_count": 1, "function": "", "source_snippet": " 270 | else if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x285, maxlen))\n 271 | SubVersion = 4;\n 272 | // printf (\"==>> CanonID_EOS_1D_X, SubVersion: %d\\n\", SubVersion);\n 273 | \n 274 | if (SubVersion < 3)\n 275 | SubVersion_offset += -3;\n 276 | \n 277 | iCanonCurFocal = 0x23+SubVersion_offset;\n 278 | iMakernotesFlip = 0x7d+SubVersion_offset;\n 279 | \n 280 | if (SubVersion < 3)\n 281 | SubVersion_offset += -4;\n 282 | else if (SubVersion == 4)\n 283 | SubVersion_offset += 5;\n 284 | \n 285 | iCanonLensID = 0x1a7+SubVersion_offset;\n 286 | iCanonMinFocal = 0x1a9+SubVersion_offset;\n 287 | iCanonMaxFocal = 0x1ab+SubVersion_offset;\n 288 | break;\n 289 | \n 290 | case CanonID_EOS_5D:\n 291 | iMakernotesFlip = 0x27;\n 292 | iCanonCurFocal = 0x28;\n 293 | iCanonLensID = 0x0c;\n 294 | if (!sget2Rev(CameraInfo + iCanonLensID))\n 295 | iCanonLensID = 0x97;\n 296 | iCanonMinFocal = 0x93;\n 297 | iCanonMaxFocal = 0x95;\n 298 | break;\n 299 | \n 300 | case CanonID_EOS_5D_Mark_II:\n 301 | iHTP = 0x07;\n 302 | iCanonCurFocal = 0x1e;\n 303 | iMakernotesFlip = 0x31;\n 304 | iALO = 0xbf;\n 305 | iCanonLensID = 0xe6;\n 306 | iCanonMinFocal = 0xe8;\n 307 | iCanonMaxFocal = 0xea;\n 308 | break;\n 309 | \n 310 | case CanonID_EOS_5D_Mark_III:\n 311 | if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x22c, maxlen))\n 312 | SubVersion = 1;\n 313 | else if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x22d, maxlen))\n 314 | SubVersion = 2;\n 315 | else if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x23c, maxlen))\n 316 | SubVersion = 3;\n 317 | else if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x242, maxlen))\n 318 | SubVersion = 4;\n 319 | else if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x247, maxlen))\n 320 | SubVersion = 5;\n 321 | // printf (\"==>> CanonID_EOS_5D_Mark_III, SubVersion: %d\\n\", SubVersion);\n 322 | \n 323 | if (!SubVersion)\n 324 | break;\n 325 | else if (SubVersion < 3)\n 326 | SubVersion_offset += -1;\n 327 | \n 328 | iCanonCurFocal = 0x23+SubVersion_offset;\n 329 | \n 330 | if (SubVersion == 1)\n 331 | SubVersion_offset += -3;\n 332 | else if (SubVersion == 2)\n 333 | SubVersion_offset += -2;\n 334 | else if (SubVersion >= 4)\n 335 | SubVersion_offset += 6;\n 336 | \n 337 | iMakernotesFlip = 0x7d+SubVersion_offset;\n 338 | \n 339 | if (SubVersion < 3)\n 340 | SubVersion_offset += -4;\n 341 | else if (SubVersion > 4)\n 342 | SubVersion_offset += 5;\n 343 | \n 344 | iCanonLensID = 0x153+SubVersion_offset;\n 345 | iCanonMinFocal = 0x155+SubVersion_offset;\n 346 | iCanonMaxFocal = 0x157+SubVersion_offset;\n 347 | break;\n 348 | \n 349 | case CanonID_EOS_5D_Mark_IV:\n 350 | iMakernotesFlip = 0x96;\n 351 | iAutoRotateMode = 0x5da;\n 352 | //printf (\"==>> 5DMkIV: MakernotesFlip: %d; AutoRotateMode: %d\\n\", CameraInfo[iMakernotesFlip], CameraInfo[iAutoRotateMode]);\n 353 | break;\n 354 | \n 355 | case CanonID_EOS_5DS:\n 356 | case CanonID_EOS_5DS_R:\n 357 | iMakernotesFlip = 0x96;\n 358 | iAutoRotateMode = 0x580;\n 359 | //printf (\"==>> 5DS/5DS R: MakernotesFlip: %d; AutoRotateMode: %d\\n\", CameraInfo[iMakernotesFlip], CameraInfo[iAutoRotateMode]);\n 360 | break;\n 361 | \n 362 | case CanonID_EOS_6D:\n 363 | iCanonCurFocal = 0x23;\n 364 | iMakernotesFlip = 0x83;\n 365 | iCanonLensID = 0x161;\n 366 | iCanonMinFocal = 0x163;\n 367 | iCanonMaxFocal = 0x165;\n 368 | iAutoRotateMode = 0x3b2;\n 369 | //printf (\"==>> 6D: MakernotesFlip: %d; AutoRotateMode: %d\\n\", CameraInfo[iMakernotesFlip], CameraInfo[iAutoRotateMode]);\n> 370 | break;\n 371 | \n 372 | case CanonID_EOS_7D:\n 373 | if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x1a8, maxlen))\n 374 | SubVersion = 1;\n 375 | else if (CanonCameraInfo_checkFirmwareRecordLocation(CameraInfo, 0x1ac, maxlen))\n 376 | SubVersion = 2;\n 377 | // printf (\"==>> CanonID_EOS_7D, SubVersion: %d\\n\", SubVersion);\n 378 | iHTP = 0x07;\n 379 | iCanonCurFocal = 0x1e;\n 380 | \n 381 | if (!SubVersion)\n 382 | break;\n 383 | else if (SubVersion < 2)\n 384 | SubVersion_offset += -4;\n 385 | \n 386 | iMakernotesFlip = 0x35+SubVersion_offset;\n 387 | iCanonLensID = 0x112+SubVersion_offset;\n 388 | iCanonMinFocal = 0x114+SubVersion_offset;\n 389 | iCanonMaxFocal = 0x116+SubVersion_offset;\n 390 | break;\n 391 | \n 392 | case CanonID_EOS_40D:\n 393 | iCanonCurFocal = 0x1d;\n 394 | iMakernotesFlip = 0x30;\n 395 | iCanonLensID = 0xd6;\n 396 | iCanonMinFocal = 0xd8;\n 397 | iCanonMaxFocal = 0xda;\n 398 | iCanonLens = 0x92b;\n 399 | break;\n 400 | \n 401 | case CanonID_EOS_50D:\n 402 | iHTP = 0x07;\n 403 | iCanonCurFocal = 0x1e;\n 404 | iMakernotesFlip = 0x31;\n 405 | iALO = 0xbf;\n 406 | iCanonLensID = 0xea;\n 407 | iCanonMinFocal = 0xec;\n 408 | iCanonMaxFocal = 0xee;\n 409 | break;\n 410 | \n 411 | case CanonID_EOS_60D:\n 412 | case CanonID_EOS_1200D:\n 413 | iCanonCurFocal = 0x1e;\n 414 | if (id == CanonID_EOS_60D)\n 415 | iMakernotesFlip = 0x36;\n 416 | else\n 417 | iMakernotesFlip = 0x3a;\n 418 | iCanonLensID = 0xe8;\n 419 | iCanonMinFocal = 0xea;\n 420 | iCanonMaxFocal = 0xec;\n 421 | break;\n 422 | \n 423 | case CanonID_EOS_70D:\n 424 | iCanonCurFocal = 0x23;\n 425 | iMakernotesFlip = 0x84;\n 426 | iCanonLensID = 0x166;\n 427 | iCanonMinFocal = 0x168;\n 428 | iCanonMaxFocal = 0x16a;\n 429 | break;\n 430 | \n 431 | case CanonID_EOS_80D:\n 432 | iCanonCurFocal = 0x23;\n 433 | iMakernotesFlip = 0x96;\n 434 | iCanonLensID = 0x189;\n 435 | iCanonMinFocal = 0x18b;\n 436 | iCanonMaxFocal = 0x18d;\n 437 | break;\n 438 | \n 439 | case CanonID_EOS_450D:\n 440 | iCanonCurFocal = 0x1d;\n 441 | iMakernotesFlip = 0x30;\n 442 | iCanonLensID = 0xde;\n 443 | iCanonLens = 0x933;\n 444 | break;\n 445 | \n 446 | case CanonID_EOS_500D:\n 447 | iHTP = 0x07;\n 448 | iCanonCurFocal = 0x1e;\n 449 | iMakernotesFlip = 0x31;\n 450 | iALO = 0xbe;\n 451 | iCanonLensID = 0xf6;\n 452 | iCanonMinFocal = 0xf8;\n 453 | iCanonMaxFocal = 0xfa;\n 454 | break;\n 455 | \n 456 | case CanonID_EOS_550D:\n 457 | iHTP = 0x07;\n 458 | iCanonCurFocal = 0x1e;\n 459 | iMakernotesFlip = 0x35;\n 460 | iCanonLensID = 0xff;\n 461 | iCanonMinFocal = 0x101;\n 462 | iCanonMaxFocal = 0x103;\n 463 | break;\n 464 | \n 465 | case CanonID_EOS_600D:\n 466 | case CanonID_EOS_1100D:\n 467 | iHTP = 0x07;\n 468 | iCanonCurFocal = 0x1e;\n 469 | iMakernotesFlip = 0x38;\n 470 | iCanonLensID = 0xea;", "src_commits": "[{\"path\":\"/src/libraw\",\"rev\":\"f9d5f6565a36abc60e672e2db6e7ca80b6bf642e\",\"url\":\"https://github.com/libraw/libraw\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"libraw_fuzzer\"]", "cnt": 1950, "coverage_keys": "[\"/src/libraw/src/metadata/canon.cpp\"]", "target_text": "Reach line at /src/libraw/src/metadata/canon.cpp:370 (observed count 1950).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-libraw:v2026-07-test1@sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_digest": "sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "libraw:merged:src/libraw/src/demosaic/xtrans_demosaic.cpp:390", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "libraw", "harness": "merged", "harness_binaries": "[\"libraw_cr2_fuzzer\", \"libraw_fuzzer\", \"libraw_nef_fuzzer\", \"libraw_raf_fuzzer\"]", "language": "c++", "file": "/src/libraw/src/demosaic/xtrans_demosaic.cpp", "line_start": 390, "line_end": 390, "line_count": 1, "function": "", "source_snippet": " 290 | rix += LIBRAW_AHD_TILE * LIBRAW_AHD_TILE;\n 291 | }\n 292 | }\n 293 | }\n 294 | \n 295 | /* Interpolate red for blue pixels and vice versa:\t\t*/\n 296 | for (int row = top + 3; row < mrow - 3; row++)\n 297 | for (int col = left + 3; col < mcol - 3; col++)\n 298 | {\n 299 | int f;\n 300 | if ((f = 2 - fcol(row, col)) == 1)\n 301 | continue;\n 302 | rix = &rgb[0][row - top][col - left];\n 303 | c = (row - sgrow) % 3 ? LIBRAW_AHD_TILE : 1;\n 304 | int h = 3 * (c ^ LIBRAW_AHD_TILE ^ 1);\n 305 | for (int d = 0; d < 4; d++, rix += LIBRAW_AHD_TILE * LIBRAW_AHD_TILE)\n 306 | {\n 307 | int i = d > 1 || ((d ^ c) & 1) ||\n 308 | ((ABS(rix[0][1] - rix[c][1]) +\n 309 | ABS(rix[0][1] - rix[-c][1])) <\n 310 | 2 * (ABS(rix[0][1] - rix[h][1]) +\n 311 | ABS(rix[0][1] - rix[-h][1])))\n 312 | ? c\n 313 | : h;\n 314 | rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + 2 * rix[0][1] -\n 315 | rix[i][1] - rix[-i][1]) /\n 316 | 2);\n 317 | }\n 318 | }\n 319 | \n 320 | /* Fill in red and blue for 2x2 blocks of green:\t\t*/\n 321 | for (int row = top + 2; row < mrow - 2; row++)\n 322 | if ((row - sgrow) % 3)\n 323 | for (int col = left + 2; col < mcol - 2; col++)\n 324 | if ((col - sgcol) % 3)\n 325 | {\n 326 | rix = &rgb[0][row - top][col - left];\n 327 | short* hex = allhex[row % 3][col % 3][1];\n 328 | for (int d = 0; d < 8;\n 329 | d += 2, rix += LIBRAW_AHD_TILE * LIBRAW_AHD_TILE)\n 330 | if (hex[d] + hex[d + 1])\n 331 | {\n 332 | int g = 3 * rix[0][1] - 2 * rix[hex[d]][1] - rix[hex[d + 1]][1];\n 333 | for (c = 0; c < 4; c += 2)\n 334 | rix[0][c] = CLIP(\n 335 | (g + 2 * rix[hex[d]][c] + rix[hex[d + 1]][c]) / 3);\n 336 | }\n 337 | else\n 338 | {\n 339 | int g = 2 * rix[0][1] - rix[hex[d]][1] - rix[hex[d + 1]][1];\n 340 | for (c = 0; c < 4; c += 2)\n 341 | rix[0][c] =\n 342 | CLIP((g + rix[hex[d]][c] + rix[hex[d + 1]][c]) / 2);\n 343 | }\n 344 | }\n 345 | }\n 346 | rgb = (ushort(*)[LIBRAW_AHD_TILE][LIBRAW_AHD_TILE][3])buffer;\n 347 | mrow -= top;\n 348 | mcol -= left;\n 349 | \n 350 | /* Convert to CIELab and differentiate in all directions:\t*/\n 351 | // no effect\n 352 | for (int d = 0; d < ndir; d++)\n 353 | {\n 354 | for (int row = 2; row < mrow - 2; row++)\n 355 | for (int col = 2; col < mcol - 2; col++)\n 356 | cielab(rgb[d][row][col], lab[row][col]);\n 357 | for (int f = dir[d & 3], row = 3; row < mrow - 3; row++)\n 358 | for (int col = 3; col < mcol - 3; col++)\n 359 | {\n 360 | lix = &lab[row][col];\n 361 | int g = 2 * lix[0][0] - lix[f][0] - lix[-f][0];\n 362 | drv[d][row][col] =\n 363 | \t\t\t\t\t\t\tfloat(\n 364 | SQR(g) +\n 365 | SQR((2 * lix[0][1] - lix[f][1] - lix[-f][1] + g * 500 / 232)) +\n 366 | SQR((2 * lix[0][2] - lix[f][2] - lix[-f][2] - g * 500 / 580))\n 367 | \t\t\t\t\t\t\t\t);\n 368 | }\n 369 | }\n 370 | \n 371 | /* Build homogeneity maps from the derivatives:\t\t\t*/\n 372 | memset(homo, 0, ndir * LIBRAW_AHD_TILE * LIBRAW_AHD_TILE);\n 373 | for (int row = 4; row < mrow - 4; row++)\n 374 | for (int col = 4; col < mcol - 4; col++)\n 375 | {\n 376 | int d;\n 377 | float tr;\n 378 | for (tr = FLT_MAX, d = 0; d < ndir; d++)\n 379 | if (tr > drv[d][row][col])\n 380 | tr = drv[d][row][col];\n 381 | tr *= 8;\n 382 | for (int dd = 0; dd < ndir; dd++)\n 383 | for (int v = -1; v <= 1; v++)\n 384 | for (int h = -1; h <= 1; h++)\n 385 | if (drv[dd][row + v][col + h] <= tr)\n 386 | homo[dd][row][col]++;\n 387 | }\n 388 | \n 389 | /* Average the most homogeneous pixels for the final result:\t*/\n> 390 | if (height - top < LIBRAW_AHD_TILE + 4)\n 391 | mrow = height - top + 2;\n 392 | if (width - left < LIBRAW_AHD_TILE + 4)\n 393 | mcol = width - left + 2;\n 394 | for (int row = MIN(top, 8); row < mrow - 8; row++)\n 395 | for (int col = MIN(left, 8); col < mcol - 8; col++)\n 396 | {\n 397 | int v;\n 398 | int hm[8];\n 399 | for (int d = 0; d < ndir; d++)\n 400 | for (v = -2, hm[d] = 0; v <= 2; v++)\n 401 | for (int h = -2; h <= 2; h++)\n 402 | hm[d] += homo[d][row + v][col + h];\n 403 | for (int d = 0; d < ndir - 4; d++)\n 404 | if (hm[d] < hm[d + 4])\n 405 | hm[d] = 0;\n 406 | else if (hm[d] > hm[d + 4])\n 407 | hm[d + 4] = 0;\n 408 | ushort max;\n 409 | int d;\n 410 | for (d = 1, max = hm[0]; d < ndir; d++)\n 411 | if (max < hm[d])\n 412 | max = hm[d];\n 413 | max -= max >> 3;\n 414 | \n 415 | int avg[4];\n 416 | memset(avg, 0, sizeof avg);\n 417 | for (int dd = 0; dd < ndir; dd++)\n 418 | if (hm[dd] >= max)\n 419 | {\n 420 | FORC3 avg[c] += rgb[dd][row][col][c];\n 421 | avg[3]++;\n 422 | }\n 423 | FORC3 image[(row + top) * width + col + left][c] = avg[c] / avg[3];\n 424 | }\n 425 | }\n 426 | }\n 427 | \n 428 | #ifdef LIBRAW_USE_OPENMP\n 429 | #pragma omp barrier\n 430 | #endif\n 431 | \n 432 | free_omp_buffers(buffers, buffer_count);\n 433 | \n 434 | border_interpolate(8);\n 435 | }\n 436 | #undef fcol", "src_commits": "[{\"path\":\"/src/libraw\",\"rev\":\"f9d5f6565a36abc60e672e2db6e7ca80b6bf642e\",\"url\":\"https://github.com/libraw/libraw\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"libraw_fuzzer\"]", "cnt": 3160, "coverage_keys": "[\"/src/libraw/src/demosaic/xtrans_demosaic.cpp\"]", "target_text": "Reach line at /src/libraw/src/demosaic/xtrans_demosaic.cpp:390 (observed count 3160).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-libraw:v2026-07-test1@sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_digest": "sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "rdkit:merged:src/rdkit/Code/GraphMol/SmilesParse/CXSmilesOps.cpp:1250", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "rdkit", "harness": "merged", "harness_binaries": "[\"mol_data_stream_to_mol_fuzzer\", \"mol_deserialization_fuzzer\", \"smiles_string_to_mol_fuzzer\"]", "language": "c++", "file": "/src/rdkit/Code/GraphMol/SmilesParse/CXSmilesOps.cpp", "line_start": 1250, "line_end": 1250, "line_count": 1, "function": "", "source_snippet": " 1150 | bond->setProp(common_properties::_MolFileBondCfg, cfg);\n 1151 | bond->setBondDir(state);\n 1152 | if (cfg == 2 && canHaveDirection(*bond)) {\n 1153 | bond->getBeginAtom()->setChiralTag(Atom::ChiralType::CHI_UNSPECIFIED);\n 1154 | mol.setProp(detail::_needsDetectBondStereo, 1);\n 1155 | }\n 1156 | if ((cfg == 1 || cfg == 3) && canHaveDirection(*bond)) {\n 1157 | mol.setProp(detail::_needsDetectAtomStereo, 1);\n 1158 | }\n 1159 | }\n 1160 | if (first < last && *first == ',') {\n 1161 | ++first;\n 1162 | }\n 1163 | }\n 1164 | return true;\n 1165 | }\n 1166 | \n 1167 | template <typename Iterator>\n 1168 | bool parse_doublebond_stereo(Iterator &first, Iterator last, RDKit::RWMol &mol,\n 1169 | unsigned int, unsigned int startBondIdx,\n 1170 | Bond::BondStereo stereo) {\n 1171 | // these look like: C1CCCC/C=C/CCC1 |ctu:5|\n 1172 | // also c and t for cis or trans\n 1173 | //\n 1174 | while (first < last && *first != ':') {\n 1175 | ++first;\n 1176 | }\n 1177 | if (first >= last || *first != ':') {\n 1178 | return false;\n 1179 | }\n 1180 | ++first;\n 1181 | \n 1182 | while (first < last && *first >= '0' && *first <= '9') {\n 1183 | unsigned int bondIdx;\n 1184 | if (!read_int(first, last, bondIdx)) {\n 1185 | return false;\n 1186 | }\n 1187 | if (VALID_BNDIDX(bondIdx)) {\n 1188 | auto bond = get_bond_with_smiles_idx(mol, bondIdx - startBondIdx);\n 1189 | \n 1190 | if (!bond) {\n 1191 | BOOST_LOG(rdWarningLog)\n 1192 | << \"bond \" << bondIdx\n 1193 | << \" not found, cannot mark as stereo double bond.\" << std::endl;\n 1194 | return false;\n 1195 | }\n 1196 | \n 1197 | bool useCXOrdering = true;\n 1198 | Chirality::detail::setStereoForBond(mol, bond, stereo, useCXOrdering);\n 1199 | }\n 1200 | if (first < last && *first == ',') {\n 1201 | ++first;\n 1202 | }\n 1203 | }\n 1204 | return true;\n 1205 | }\n 1206 | \n 1207 | template <typename Iterator>\n 1208 | bool parse_substitution(Iterator &first, Iterator last, RDKit::RWMol &mol,\n 1209 | unsigned int startAtomIdx) {\n 1210 | if (first >= last || *first != 's' || first + 1 >= last ||\n 1211 | *(first + 1) != ':') {\n 1212 | return false;\n 1213 | }\n 1214 | first += 2;\n 1215 | while (first < last && *first >= '0' && *first <= '9') {\n 1216 | unsigned int n1;\n 1217 | if (!read_int(first, last, n1)) {\n 1218 | return false;\n 1219 | }\n 1220 | // check that we can read at least two more characters:\n 1221 | if (first + 1 >= last || *first != ':') {\n 1222 | return false;\n 1223 | }\n 1224 | ++first;\n 1225 | unsigned int n2;\n 1226 | if (*first == '*') {\n 1227 | ++first;\n 1228 | n2 = 0xDEADBEEF;\n 1229 | if (VALID_ATIDX(n1)) {\n 1230 | mol.setProp(common_properties::_NeedsQueryScan, 1);\n 1231 | }\n 1232 | } else {\n 1233 | if (!read_int(first, last, n2)) {\n 1234 | return false;\n 1235 | }\n 1236 | }\n 1237 | if (VALID_ATIDX(n1)) {\n 1238 | auto atom = mol.getAtomWithIdx(n1 - startAtomIdx);\n 1239 | if (!atom->hasQuery()) {\n 1240 | atom = QueryOps::replaceAtomWithQueryAtom(&mol, atom);\n 1241 | }\n 1242 | atom->expandQuery(makeAtomNonHydrogenDegreeQuery(n2),\n 1243 | Queries::COMPOSITE_AND);\n 1244 | }\n 1245 | if (first < last && *first == ',') {\n 1246 | ++first;\n 1247 | }\n 1248 | }\n 1249 | return true;\n> 1250 | }\n 1251 | \n 1252 | template <typename Iterator>\n 1253 | bool processRadicalSection(Iterator &first, Iterator last, RDKit::RWMol &mol,\n 1254 | unsigned int numRadicalElectrons,\n 1255 | unsigned int startAtomIdx) {\n 1256 | if (first >= last) {\n 1257 | return false;\n 1258 | }\n 1259 | ++first;\n 1260 | if (first >= last || *first != ':') {\n 1261 | return false;\n 1262 | }\n 1263 | ++first;\n 1264 | unsigned int atIdx;\n 1265 | if (!read_int(first, last, atIdx)) {\n 1266 | return false;\n 1267 | }\n 1268 | if (VALID_ATIDX(atIdx)) {\n 1269 | mol.getAtomWithIdx(atIdx - startAtomIdx)\n 1270 | ->setNumRadicalElectrons(numRadicalElectrons);\n 1271 | }\n 1272 | while (first < last && *first == ',') {\n 1273 | ++first;\n 1274 | if (first < last && (*first < '0' || *first > '9')) {\n 1275 | return true;\n 1276 | }\n 1277 | if (!read_int(first, last, atIdx)) {\n 1278 | return false;\n 1279 | }\n 1280 | if (VALID_ATIDX(atIdx)) {\n 1281 | mol.getAtomWithIdx(atIdx - startAtomIdx)\n 1282 | ->setNumRadicalElectrons(numRadicalElectrons);\n 1283 | }\n 1284 | }\n 1285 | return first < last;\n 1286 | }\n 1287 | \n 1288 | template <typename Iterator>\n 1289 | bool parse_radicals(Iterator &first, Iterator last, RDKit::RWMol &mol,\n 1290 | unsigned int startAtomIdx) {\n 1291 | if (first >= last || *first != '^') {\n 1292 | return false;\n 1293 | }\n 1294 | while (*first == '^') {\n 1295 | ++first;\n 1296 | if (first >= last) {\n 1297 | return false;\n 1298 | }\n 1299 | if (*first < '1' || *first > '7') {\n 1300 | return false; // these are the values that are allowed to be there\n 1301 | }\n 1302 | switch (*first) {\n 1303 | case '1':\n 1304 | if (!processRadicalSection(first, last, mol, 1, startAtomIdx)) {\n 1305 | return false;\n 1306 | }\n 1307 | break;\n 1308 | case '2':\n 1309 | case '3':\n 1310 | case '4':\n 1311 | if (!processRadicalSection(first, last, mol, 2, startAtomIdx)) {\n 1312 | return false;\n 1313 | }\n 1314 | break;\n 1315 | case '5':\n 1316 | case '6':\n 1317 | case '7':\n 1318 | if (!processRadicalSection(first, last, mol, 3, startAtomIdx)) {\n 1319 | return false;\n 1320 | }\n 1321 | break;\n 1322 | default:\n 1323 | BOOST_LOG(rdWarningLog)\n 1324 | << \"Radical specification \" << *first << \" ignored.\";\n 1325 | }\n 1326 | }\n 1327 | return true;\n 1328 | }\n 1329 | \n 1330 | template <typename Iterator>\n 1331 | bool parse_enhanced_stereo(Iterator &first, Iterator last, RDKit::RWMol &mol,\n 1332 | unsigned int startAtomIdx) {\n 1333 | StereoGroupType group_type = StereoGroupType::STEREO_ABSOLUTE;\n 1334 | if (*first == 'a') {\n 1335 | group_type = StereoGroupType::STEREO_ABSOLUTE;\n 1336 | } else if (*first == 'o') {\n 1337 | group_type = StereoGroupType::STEREO_OR;\n 1338 | } else if (*first == '&') {\n 1339 | group_type = StereoGroupType::STEREO_AND;\n 1340 | }\n 1341 | ++first;\n 1342 | \n 1343 | // OR and AND groups carry a group number\n 1344 | unsigned int group_id = 0;\n 1345 | if (group_type != StereoGroupType::STEREO_ABSOLUTE) {\n 1346 | read_int(first, last, group_id);\n 1347 | }\n 1348 | \n 1349 | if (first >= last || *first != ':') {\n 1350 | return false;", "src_commits": "[{\"path\":\"/src/eigen\",\"rev\":\"2cf9891537250255f50df5109ffe9e700e2a73de\",\"url\":\"https://gitlab.com/libeigen/eigen\"},{\"path\":\"/src/rdkit\",\"rev\":\"232e4ffc84de1983918e6422fbec47d5da74db25\",\"url\":\"https://github.com/rdkit/rdkit.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"smiles_string_to_mol_fuzzer\"]", "cnt": 7720, "coverage_keys": "[\"/src/rdkit/Code/GraphMol/SmilesParse/CXSmilesOps.cpp\"]", "target_text": "Reach line at /src/rdkit/Code/GraphMol/SmilesParse/CXSmilesOps.cpp:1250 (observed count 7720).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-rdkit:v2026-07-test1@sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_digest": "sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "rdkit:merged:src/rdkit/Code/GraphMol/QueryAtom.h:47", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "rdkit", "harness": "merged", "harness_binaries": "[\"mol_data_stream_to_mol_fuzzer\", \"mol_deserialization_fuzzer\", \"smiles_string_to_mol_fuzzer\"]", "language": "c++", "file": "/src/rdkit/Code/GraphMol/QueryAtom.h", "line_start": 47, "line_end": 47, "line_count": 1, "function": "", "source_snippet": " 1 | //\n 2 | // Copyright (C) 2001-2022 Greg Landrum and other RDKit contributors\n 3 | //\n 4 | // @@ All Rights Reserved @@\n 5 | // This file is part of the RDKit.\n 6 | // The contents are covered by the terms of the BSD license\n 7 | // which is included in the file license.txt, found at the root\n 8 | // of the RDKit source tree.\n 9 | //\n 10 | #include <RDGeneral/export.h>\n 11 | #ifndef RD_QUERYATOM_H\n 12 | #define RD_QUERYATOM_H\n 13 | \n 14 | #include <utility>\n 15 | #include \"Atom.h\"\n 16 | #include <Query/QueryObjects.h>\n 17 | #include <GraphMol/QueryOps.h>\n 18 | \n 19 | namespace RDKit {\n 20 | \n 21 | //! Class for storing atomic queries\n 22 | /*!\n 23 | QueryAtom objects are derived from Atom objects, so they can be\n 24 | added to molecules and the like, but they have much fancier\n 25 | querying capabilities.\n 26 | \n 27 | */\n 28 | class RDKIT_GRAPHMOL_EXPORT QueryAtom : public Atom {\n 29 | public:\n 30 | typedef Queries::Query<int, Atom const *, true> QUERYATOM_QUERY;\n 31 | \n 32 | QueryAtom() : Atom() {}\n 33 | explicit QueryAtom(int num) : Atom(num), dp_query(makeAtomNumQuery(num)) {}\n 34 | explicit QueryAtom(const Atom &other)\n 35 | : Atom(other), dp_query(makeAtomNumQuery(other.getAtomicNum())) {\n 36 | if (other.getIsotope()) {\n 37 | this->expandQuery(makeAtomIsotopeQuery(other.getIsotope()),\n 38 | Queries::CompositeQueryType::COMPOSITE_AND);\n 39 | }\n 40 | if (other.getFormalCharge()) {\n 41 | this->expandQuery(makeAtomFormalChargeQuery(other.getFormalCharge()),\n 42 | Queries::CompositeQueryType::COMPOSITE_AND);\n 43 | }\n 44 | if (other.getNumRadicalElectrons()) {\n 45 | this->expandQuery(\n 46 | makeAtomNumRadicalElectronsQuery(other.getNumRadicalElectrons()),\n> 47 | Queries::CompositeQueryType::COMPOSITE_AND);\n 48 | }\n 49 | }\n 50 | QueryAtom(const QueryAtom &other) : Atom(other) {\n 51 | if (other.dp_query) {\n 52 | dp_query = other.dp_query->copy();\n 53 | } else {\n 54 | dp_query = nullptr;\n 55 | }\n 56 | }\n 57 | QueryAtom &operator=(const QueryAtom &other) {\n 58 | if (this == &other) {\n 59 | return *this;\n 60 | }\n 61 | Atom::operator=(other);\n 62 | delete dp_query;\n 63 | if (other.dp_query) {\n 64 | dp_query = other.dp_query->copy();\n 65 | } else {\n 66 | dp_query = nullptr;\n 67 | }\n 68 | return *this;\n 69 | }\n 70 | \n 71 | QueryAtom(QueryAtom &&other) noexcept : Atom(std::move(other)) {\n 72 | dp_query = std::exchange(other.dp_query, nullptr);\n 73 | }\n 74 | QueryAtom &operator=(QueryAtom &&other) noexcept {\n 75 | if (this == &other) {\n 76 | return *this;\n 77 | }\n 78 | QueryAtom::operator=(std::move(other));\n 79 | dp_query = std::exchange(other.dp_query, nullptr);\n 80 | return *this;\n 81 | }\n 82 | \n 83 | ~QueryAtom() override;\n 84 | \n 85 | //! returns a copy of this query, owned by the caller\n 86 | Atom *copy() const override;\n 87 | \n 88 | // This method can be used to distinguish query atoms from standard atoms:\n 89 | bool hasQuery() const override { return dp_query != nullptr; }\n 90 | \n 91 | //! returns the label associated to this query\n 92 | std::string getQueryType() const override { return dp_query->getTypeLabel(); }\n 93 | \n 94 | //! replaces our current query with the value passed in\n 95 | void setQuery(QUERYATOM_QUERY *what) override {\n 96 | delete dp_query;\n 97 | dp_query = what;\n 98 | }\n 99 | //! returns our current query\n 100 | QUERYATOM_QUERY *getQuery() const override { return dp_query; }\n 101 | \n 102 | //! expands our current query\n 103 | /*!\n 104 | \\param what the Queries::Query to be added. The ownership of\n 105 | the query is passed to the current object, where it\n 106 | might be deleted, so that the pointer should not be\n 107 | used again in the calling code.\n 108 | \\param how the operator to be used in the expansion\n 109 | \\param maintainOrder (optional) flags whether the relative order of\n 110 | the queries needs to be maintained, if this is\n 111 | false, the order is reversed\n 112 | <b>Notes:</b>\n 113 | - \\c what should probably be constructed using one of the functions\n 114 | defined in QueryOps.h\n 115 | - the \\c maintainOrder option can be useful because the combination\n 116 | operators short circuit when possible.\n 117 | \n 118 | */\n 119 | void expandQuery(QUERYATOM_QUERY *what,\n 120 | Queries::CompositeQueryType how = Queries::COMPOSITE_AND,\n 121 | bool maintainOrder = true) override;\n 122 | \n 123 | //! returns true if we match Atom \\c what\n 124 | bool Match(Atom const *what) const override;\n 125 | \n 126 | //! returns true if our query details match those of QueryAtom \\c what\n 127 | bool QueryMatch(QueryAtom const *what) const;\n 128 | \n 129 | private:\n 130 | QUERYATOM_QUERY *dp_query{nullptr};\n 131 | \n 132 | }; // end o' class\n 133 | \n 134 | namespace detail {\n 135 | inline std::string qhelper(const Atom::QUERYATOM_QUERY *q, unsigned int depth) {\n 136 | std::string res = \"\";\n 137 | if (q) {\n 138 | for (unsigned int i = 0; i < depth; ++i) {\n 139 | res += \" \";\n 140 | }\n 141 | res += q->getFullDescription() + \"\\n\";\n 142 | for (const auto &child :\n 143 | boost::make_iterator_range(q->beginChildren(), q->endChildren())) {\n 144 | res += qhelper(child.get(), depth + 1);\n 145 | }\n 146 | }\n 147 | return res;", "src_commits": "[{\"path\":\"/src/eigen\",\"rev\":\"2cf9891537250255f50df5109ffe9e700e2a73de\",\"url\":\"https://gitlab.com/libeigen/eigen\"},{\"path\":\"/src/rdkit\",\"rev\":\"232e4ffc84de1983918e6422fbec47d5da74db25\",\"url\":\"https://github.com/rdkit/rdkit.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[\"smiles_string_to_mol_fuzzer\"]", "cnt": 449, "coverage_keys": "[\"/src/rdkit/Code/GraphMol/QueryAtom.h\"]", "target_text": "Reach line at /src/rdkit/Code/GraphMol/QueryAtom.h:47 (observed count 449).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-rdkit:v2026-07-test1@sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_digest": "sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "karchive:merged:src/zlib/adler32.c:18", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "karchive", "harness": "merged", "harness_binaries": "[\"k7z_fuzzer\", \"kar_fuzzer\", \"ktar_bz2_fuzzer\", \"ktar_fuzzer\", \"ktar_gz_fuzzer\", \"ktar_lz_fuzzer\", \"ktar_xz_fuzzer\", \"ktar_zst_fuzzer\", \"kzip_fuzzer\"]", "language": "c++", "file": "/src/zlib/adler32.c", "line_start": 18, "line_end": 18, "line_count": 1, "function": "", "source_snippet": " 1 | /* adler32.c -- compute the Adler-32 checksum of a data stream\n 2 | * Copyright (C) 1995-2011, 2016 Mark Adler\n 3 | * For conditions of distribution and use, see copyright notice in zlib.h\n 4 | */\n 5 | \n 6 | /* @(#) $Id$ */\n 7 | \n 8 | #include \"zutil.h\"\n 9 | \n 10 | #define BASE 65521U /* largest prime smaller than 65536 */\n 11 | #define NMAX 5552\n 12 | /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\n 13 | \n 14 | #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}\n 15 | #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);\n 16 | #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);\n 17 | #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);\n> 18 | #define DO16(buf) DO8(buf,0); DO8(buf,8);\n 19 | \n 20 | /* use NO_DIVIDE if your processor does not do division in hardware --\n 21 | try it both ways to see which is faster */\n 22 | #ifdef NO_DIVIDE\n 23 | /* note that this assumes BASE is 65521, where 65536 % 65521 == 15\n 24 | (thank you to John Reiser for pointing this out) */\n 25 | # define CHOP(a) \\\n 26 | do { \\\n 27 | unsigned long tmp = a >> 16; \\\n 28 | a &= 0xffffUL; \\\n 29 | a += (tmp << 4) - tmp; \\\n 30 | } while (0)\n 31 | # define MOD28(a) \\\n 32 | do { \\\n 33 | CHOP(a); \\\n 34 | if (a >= BASE) a -= BASE; \\\n 35 | } while (0)\n 36 | # define MOD(a) \\\n 37 | do { \\\n 38 | CHOP(a); \\\n 39 | MOD28(a); \\\n 40 | } while (0)\n 41 | # define MOD63(a) \\\n 42 | do { /* this assumes a is not negative */ \\\n 43 | z_off64_t tmp = a >> 32; \\\n 44 | a &= 0xffffffffL; \\\n 45 | a += (tmp << 8) - (tmp << 5) + tmp; \\\n 46 | tmp = a >> 16; \\\n 47 | a &= 0xffffL; \\\n 48 | a += (tmp << 4) - tmp; \\\n 49 | tmp = a >> 16; \\\n 50 | a &= 0xffffL; \\\n 51 | a += (tmp << 4) - tmp; \\\n 52 | if (a >= BASE) a -= BASE; \\\n 53 | } while (0)\n 54 | #else\n 55 | # define MOD(a) a %= BASE\n 56 | # define MOD28(a) a %= BASE\n 57 | # define MOD63(a) a %= BASE\n 58 | #endif\n 59 | \n 60 | /* ========================================================================= */\n 61 | uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {\n 62 | unsigned long sum2;\n 63 | unsigned n;\n 64 | \n 65 | /* split Adler-32 into component sums */\n 66 | sum2 = (adler >> 16) & 0xffff;\n 67 | adler &= 0xffff;\n 68 | \n 69 | /* in case user likes doing a byte at a time, keep it fast */\n 70 | if (len == 1) {\n 71 | adler += buf[0];\n 72 | if (adler >= BASE)\n 73 | adler -= BASE;\n 74 | sum2 += adler;\n 75 | if (sum2 >= BASE)\n 76 | sum2 -= BASE;\n 77 | return adler | (sum2 << 16);\n 78 | }\n 79 | \n 80 | /* initial Adler-32 value (deferred check for len == 1 speed) */\n 81 | if (buf == Z_NULL)\n 82 | return 1L;\n 83 | \n 84 | /* in case short lengths are provided, keep it somewhat fast */\n 85 | if (len < 16) {\n 86 | while (len--) {\n 87 | adler += *buf++;\n 88 | sum2 += adler;\n 89 | }\n 90 | if (adler >= BASE)\n 91 | adler -= BASE;\n 92 | MOD28(sum2); /* only added so many BASE's */\n 93 | return adler | (sum2 << 16);\n 94 | }\n 95 | \n 96 | /* do length NMAX blocks -- requires just one modulo operation */\n 97 | while (len >= NMAX) {\n 98 | len -= NMAX;\n 99 | n = NMAX / 16; /* NMAX is divisible by 16 */\n 100 | do {\n 101 | DO16(buf); /* 16 sums unrolled */\n 102 | buf += 16;\n 103 | } while (--n);\n 104 | MOD(adler);\n 105 | MOD(sum2);\n 106 | }\n 107 | \n 108 | /* do remaining bytes (less than NMAX, still just one modulo) */\n 109 | if (len) { /* avoid modulos if none remaining */\n 110 | while (len >= 16) {\n 111 | len -= 16;\n 112 | DO16(buf);\n 113 | buf += 16;\n 114 | }\n 115 | while (len--) {\n 116 | adler += *buf++;\n 117 | sum2 += adler;\n 118 | }", "src_commits": "[{\"path\":\"/src/extra-cmake-modules\",\"rev\":\"785cc769097051335412b1df5ef8b784112e18d1\",\"url\":\"https://invent.kde.org/frameworks/extra-cmake-modules.git\"},{\"path\":\"/src/karchive\",\"rev\":\"3557ad6e4aeb96ec1b6705f43cc3dcb96d76cd6c\",\"url\":\"https://invent.kde.org/frameworks/karchive.git\"},{\"path\":\"/src/openssl\",\"rev\":\"69e54bee8d89f6703eaeca5f4c8b6a8822161c64\",\"url\":\"https://github.com/openssl/openssl.git\"},{\"path\":\"/src/qtbase\",\"rev\":\"e40473cf5458f18d6321da0fdb82ed18465a3bd8\",\"url\":\"git://code.qt.io/qt/qtbase.git\"},{\"path\":\"/src/xz\",\"rev\":\"ebb0e6789cefe3be71756881aa8f2009fda9938c\",\"url\":\"https://github.com/tukaani-project/xz.git\"},{\"path\":\"/src/zlib\",\"rev\":\"f9dd6009be3ed32415edf1e89d1bc38380ecb95d\",\"url\":\"https://github.com/madler/zlib.git\"},{\"path\":\"/src/zstd\",\"rev\":\"0cdce55f2fbf02990df8681eedb76e32f804fcc8\",\"url\":\"https://github.com/facebook/zstd.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 355000000, "coverage_keys": "[\"/src/zlib/adler32.c\"]", "target_text": "Reach line at /src/zlib/adler32.c:18 (observed count 355000000).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-karchive:v2026-07-test1@sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_digest": "sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "karchive:merged:src/zlib/inflate.c:695", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "karchive", "harness": "merged", "harness_binaries": "[\"k7z_fuzzer\", \"kar_fuzzer\", \"ktar_bz2_fuzzer\", \"ktar_fuzzer\", \"ktar_gz_fuzzer\", \"ktar_lz_fuzzer\", \"ktar_xz_fuzzer\", \"ktar_zst_fuzzer\", \"kzip_fuzzer\"]", "language": "c++", "file": "/src/zlib/inflate.c", "line_start": 695, "line_end": 695, "line_count": 1, "function": "", "source_snippet": " 595 | case EXLEN:\n 596 | if (state->flags & 0x0400) {\n 597 | NEEDBITS(16);\n 598 | state->length = (unsigned)(hold);\n 599 | if (state->head != Z_NULL)\n 600 | state->head->extra_len = (unsigned)hold;\n 601 | if ((state->flags & 0x0200) && (state->wrap & 4))\n 602 | CRC2(state->check, hold);\n 603 | INITBITS();\n 604 | }\n 605 | else if (state->head != Z_NULL)\n 606 | state->head->extra = Z_NULL;\n 607 | state->mode = EXTRA;\n 608 | /* fallthrough */\n 609 | case EXTRA:\n 610 | if (state->flags & 0x0400) {\n 611 | copy = state->length;\n 612 | if (copy > have) copy = have;\n 613 | if (copy) {\n 614 | if (state->head != Z_NULL &&\n 615 | state->head->extra != Z_NULL &&\n 616 | (len = state->head->extra_len - state->length) <\n 617 | state->head->extra_max) {\n 618 | zmemcpy(state->head->extra + len, next,\n 619 | len + copy > state->head->extra_max ?\n 620 | state->head->extra_max - len : copy);\n 621 | }\n 622 | if ((state->flags & 0x0200) && (state->wrap & 4))\n 623 | state->check = crc32(state->check, next, copy);\n 624 | have -= copy;\n 625 | next += copy;\n 626 | state->length -= copy;\n 627 | }\n 628 | if (state->length) goto inf_leave;\n 629 | }\n 630 | state->length = 0;\n 631 | state->mode = NAME;\n 632 | /* fallthrough */\n 633 | case NAME:\n 634 | if (state->flags & 0x0800) {\n 635 | if (have == 0) goto inf_leave;\n 636 | copy = 0;\n 637 | do {\n 638 | len = (unsigned)(next[copy++]);\n 639 | if (state->head != Z_NULL &&\n 640 | state->head->name != Z_NULL &&\n 641 | state->length < state->head->name_max)\n 642 | state->head->name[state->length++] = (Bytef)len;\n 643 | } while (len && copy < have);\n 644 | if ((state->flags & 0x0200) && (state->wrap & 4))\n 645 | state->check = crc32(state->check, next, copy);\n 646 | have -= copy;\n 647 | next += copy;\n 648 | if (len) goto inf_leave;\n 649 | }\n 650 | else if (state->head != Z_NULL)\n 651 | state->head->name = Z_NULL;\n 652 | state->length = 0;\n 653 | state->mode = COMMENT;\n 654 | /* fallthrough */\n 655 | case COMMENT:\n 656 | if (state->flags & 0x1000) {\n 657 | if (have == 0) goto inf_leave;\n 658 | copy = 0;\n 659 | do {\n 660 | len = (unsigned)(next[copy++]);\n 661 | if (state->head != Z_NULL &&\n 662 | state->head->comment != Z_NULL &&\n 663 | state->length < state->head->comm_max)\n 664 | state->head->comment[state->length++] = (Bytef)len;\n 665 | } while (len && copy < have);\n 666 | if ((state->flags & 0x0200) && (state->wrap & 4))\n 667 | state->check = crc32(state->check, next, copy);\n 668 | have -= copy;\n 669 | next += copy;\n 670 | if (len) goto inf_leave;\n 671 | }\n 672 | else if (state->head != Z_NULL)\n 673 | state->head->comment = Z_NULL;\n 674 | state->mode = HCRC;\n 675 | /* fallthrough */\n 676 | case HCRC:\n 677 | if (state->flags & 0x0200) {\n 678 | NEEDBITS(16);\n 679 | if ((state->wrap & 4) && hold != (state->check & 0xffff)) {\n 680 | strm->msg = (z_const char *)\"header crc mismatch\";\n 681 | state->mode = BAD;\n 682 | break;\n 683 | }\n 684 | INITBITS();\n 685 | }\n 686 | if (state->head != Z_NULL) {\n 687 | state->head->hcrc = (int)((state->flags >> 9) & 1);\n 688 | state->head->done = 1;\n 689 | }\n 690 | strm->adler = state->check = crc32(0L, Z_NULL, 0);\n 691 | state->mode = TYPE;\n 692 | break;\n 693 | #endif\n 694 | case DICTID:\n> 695 | NEEDBITS(32);\n 696 | strm->adler = state->check = ZSWAP32(hold);\n 697 | INITBITS();\n 698 | state->mode = DICT;\n 699 | /* fallthrough */\n 700 | case DICT:\n 701 | if (state->havedict == 0) {\n 702 | RESTORE();\n 703 | return Z_NEED_DICT;\n 704 | }\n 705 | strm->adler = state->check = adler32(0L, Z_NULL, 0);\n 706 | state->mode = TYPE;\n 707 | /* fallthrough */\n 708 | case TYPE:\n 709 | if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;\n 710 | /* fallthrough */\n 711 | case TYPEDO:\n 712 | if (state->last) {\n 713 | BYTEBITS();\n 714 | state->mode = CHECK;\n 715 | break;\n 716 | }\n 717 | NEEDBITS(3);\n 718 | state->last = BITS(1);\n 719 | DROPBITS(1);\n 720 | switch (BITS(2)) {\n 721 | case 0: /* stored block */\n 722 | Tracev((stderr, \"inflate: stored block%s\\n\",\n 723 | state->last ? \" (last)\" : \"\"));\n 724 | state->mode = STORED;\n 725 | break;\n 726 | case 1: /* fixed block */\n 727 | inflate_fixed(state);\n 728 | Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n 729 | state->last ? \" (last)\" : \"\"));\n 730 | state->mode = LEN_; /* decode codes */\n 731 | if (flush == Z_TREES) {\n 732 | DROPBITS(2);\n 733 | goto inf_leave;\n 734 | }\n 735 | break;\n 736 | case 2: /* dynamic block */\n 737 | Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n 738 | state->last ? \" (last)\" : \"\"));\n 739 | state->mode = TABLE;\n 740 | break;\n 741 | default:\n 742 | strm->msg = (z_const char *)\"invalid block type\";\n 743 | state->mode = BAD;\n 744 | }\n 745 | DROPBITS(2);\n 746 | break;\n 747 | case STORED:\n 748 | BYTEBITS(); /* go to byte boundary */\n 749 | NEEDBITS(32);\n 750 | if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {\n 751 | strm->msg = (z_const char *)\"invalid stored block lengths\";\n 752 | state->mode = BAD;\n 753 | break;\n 754 | }\n 755 | state->length = (unsigned)hold & 0xffff;\n 756 | Tracev((stderr, \"inflate: stored length %u\\n\",\n 757 | state->length));\n 758 | INITBITS();\n 759 | state->mode = COPY_;\n 760 | if (flush == Z_TREES) goto inf_leave;\n 761 | /* fallthrough */\n 762 | case COPY_:\n 763 | state->mode = COPY;\n 764 | /* fallthrough */\n 765 | case COPY:\n 766 | copy = state->length;\n 767 | if (copy) {\n 768 | if (copy > have) copy = have;\n 769 | if (copy > left) copy = left;\n 770 | if (copy == 0) goto inf_leave;\n 771 | zmemcpy(put, next, copy);\n 772 | have -= copy;\n 773 | next += copy;\n 774 | left -= copy;\n 775 | put += copy;\n 776 | state->length -= copy;\n 777 | break;\n 778 | }\n 779 | Tracev((stderr, \"inflate: stored end\\n\"));\n 780 | state->mode = TYPE;\n 781 | break;\n 782 | case TABLE:\n 783 | NEEDBITS(14);\n 784 | state->nlen = BITS(5) + 257;\n 785 | DROPBITS(5);\n 786 | state->ndist = BITS(5) + 1;\n 787 | DROPBITS(5);\n 788 | state->ncode = BITS(4) + 4;\n 789 | DROPBITS(4);\n 790 | #ifndef PKZIP_BUG_WORKAROUND\n 791 | if (state->nlen > 286 || state->ndist > 30) {\n 792 | strm->msg = (z_const char *)\n 793 | \"too many length or distance symbols\";\n 794 | state->mode = BAD;\n 795 | break;", "src_commits": "[{\"path\":\"/src/extra-cmake-modules\",\"rev\":\"785cc769097051335412b1df5ef8b784112e18d1\",\"url\":\"https://invent.kde.org/frameworks/extra-cmake-modules.git\"},{\"path\":\"/src/karchive\",\"rev\":\"3557ad6e4aeb96ec1b6705f43cc3dcb96d76cd6c\",\"url\":\"https://invent.kde.org/frameworks/karchive.git\"},{\"path\":\"/src/openssl\",\"rev\":\"69e54bee8d89f6703eaeca5f4c8b6a8822161c64\",\"url\":\"https://github.com/openssl/openssl.git\"},{\"path\":\"/src/qtbase\",\"rev\":\"e40473cf5458f18d6321da0fdb82ed18465a3bd8\",\"url\":\"git://code.qt.io/qt/qtbase.git\"},{\"path\":\"/src/xz\",\"rev\":\"ebb0e6789cefe3be71756881aa8f2009fda9938c\",\"url\":\"https://github.com/tukaani-project/xz.git\"},{\"path\":\"/src/zlib\",\"rev\":\"f9dd6009be3ed32415edf1e89d1bc38380ecb95d\",\"url\":\"https://github.com/madler/zlib.git\"},{\"path\":\"/src/zstd\",\"rev\":\"0cdce55f2fbf02990df8681eedb76e32f804fcc8\",\"url\":\"https://github.com/facebook/zstd.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 27, "coverage_keys": "[\"/src/zlib/inflate.c\"]", "target_text": "Reach line at /src/zlib/inflate.c:695 (observed count 27).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-karchive:v2026-07-test1@sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_digest": "sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "karchive:merged:src/zlib/adler32.c:74", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "karchive", "harness": "merged", "harness_binaries": "[\"k7z_fuzzer\", \"kar_fuzzer\", \"ktar_bz2_fuzzer\", \"ktar_fuzzer\", \"ktar_gz_fuzzer\", \"ktar_lz_fuzzer\", \"ktar_xz_fuzzer\", \"ktar_zst_fuzzer\", \"kzip_fuzzer\"]", "language": "c++", "file": "/src/zlib/adler32.c", "line_start": 74, "line_end": 74, "line_count": 1, "function": "", "source_snippet": " 1 | /* adler32.c -- compute the Adler-32 checksum of a data stream\n 2 | * Copyright (C) 1995-2011, 2016 Mark Adler\n 3 | * For conditions of distribution and use, see copyright notice in zlib.h\n 4 | */\n 5 | \n 6 | /* @(#) $Id$ */\n 7 | \n 8 | #include \"zutil.h\"\n 9 | \n 10 | #define BASE 65521U /* largest prime smaller than 65536 */\n 11 | #define NMAX 5552\n 12 | /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */\n 13 | \n 14 | #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}\n 15 | #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);\n 16 | #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);\n 17 | #define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);\n 18 | #define DO16(buf) DO8(buf,0); DO8(buf,8);\n 19 | \n 20 | /* use NO_DIVIDE if your processor does not do division in hardware --\n 21 | try it both ways to see which is faster */\n 22 | #ifdef NO_DIVIDE\n 23 | /* note that this assumes BASE is 65521, where 65536 % 65521 == 15\n 24 | (thank you to John Reiser for pointing this out) */\n 25 | # define CHOP(a) \\\n 26 | do { \\\n 27 | unsigned long tmp = a >> 16; \\\n 28 | a &= 0xffffUL; \\\n 29 | a += (tmp << 4) - tmp; \\\n 30 | } while (0)\n 31 | # define MOD28(a) \\\n 32 | do { \\\n 33 | CHOP(a); \\\n 34 | if (a >= BASE) a -= BASE; \\\n 35 | } while (0)\n 36 | # define MOD(a) \\\n 37 | do { \\\n 38 | CHOP(a); \\\n 39 | MOD28(a); \\\n 40 | } while (0)\n 41 | # define MOD63(a) \\\n 42 | do { /* this assumes a is not negative */ \\\n 43 | z_off64_t tmp = a >> 32; \\\n 44 | a &= 0xffffffffL; \\\n 45 | a += (tmp << 8) - (tmp << 5) + tmp; \\\n 46 | tmp = a >> 16; \\\n 47 | a &= 0xffffL; \\\n 48 | a += (tmp << 4) - tmp; \\\n 49 | tmp = a >> 16; \\\n 50 | a &= 0xffffL; \\\n 51 | a += (tmp << 4) - tmp; \\\n 52 | if (a >= BASE) a -= BASE; \\\n 53 | } while (0)\n 54 | #else\n 55 | # define MOD(a) a %= BASE\n 56 | # define MOD28(a) a %= BASE\n 57 | # define MOD63(a) a %= BASE\n 58 | #endif\n 59 | \n 60 | /* ========================================================================= */\n 61 | uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {\n 62 | unsigned long sum2;\n 63 | unsigned n;\n 64 | \n 65 | /* split Adler-32 into component sums */\n 66 | sum2 = (adler >> 16) & 0xffff;\n 67 | adler &= 0xffff;\n 68 | \n 69 | /* in case user likes doing a byte at a time, keep it fast */\n 70 | if (len == 1) {\n 71 | adler += buf[0];\n 72 | if (adler >= BASE)\n 73 | adler -= BASE;\n> 74 | sum2 += adler;\n 75 | if (sum2 >= BASE)\n 76 | sum2 -= BASE;\n 77 | return adler | (sum2 << 16);\n 78 | }\n 79 | \n 80 | /* initial Adler-32 value (deferred check for len == 1 speed) */\n 81 | if (buf == Z_NULL)\n 82 | return 1L;\n 83 | \n 84 | /* in case short lengths are provided, keep it somewhat fast */\n 85 | if (len < 16) {\n 86 | while (len--) {\n 87 | adler += *buf++;\n 88 | sum2 += adler;\n 89 | }\n 90 | if (adler >= BASE)\n 91 | adler -= BASE;\n 92 | MOD28(sum2); /* only added so many BASE's */\n 93 | return adler | (sum2 << 16);\n 94 | }\n 95 | \n 96 | /* do length NMAX blocks -- requires just one modulo operation */\n 97 | while (len >= NMAX) {\n 98 | len -= NMAX;\n 99 | n = NMAX / 16; /* NMAX is divisible by 16 */\n 100 | do {\n 101 | DO16(buf); /* 16 sums unrolled */\n 102 | buf += 16;\n 103 | } while (--n);\n 104 | MOD(adler);\n 105 | MOD(sum2);\n 106 | }\n 107 | \n 108 | /* do remaining bytes (less than NMAX, still just one modulo) */\n 109 | if (len) { /* avoid modulos if none remaining */\n 110 | while (len >= 16) {\n 111 | len -= 16;\n 112 | DO16(buf);\n 113 | buf += 16;\n 114 | }\n 115 | while (len--) {\n 116 | adler += *buf++;\n 117 | sum2 += adler;\n 118 | }\n 119 | MOD(adler);\n 120 | MOD(sum2);\n 121 | }\n 122 | \n 123 | /* return recombined sums */\n 124 | return adler | (sum2 << 16);\n 125 | }\n 126 | \n 127 | /* ========================================================================= */\n 128 | uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {\n 129 | return adler32_z(adler, buf, len);\n 130 | }\n 131 | \n 132 | /* ========================================================================= */\n 133 | local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {\n 134 | unsigned long sum1;\n 135 | unsigned long sum2;\n 136 | unsigned rem;\n 137 | \n 138 | /* for negative len, return invalid adler32 as a clue for debugging */\n 139 | if (len2 < 0)\n 140 | return 0xffffffffUL;\n 141 | \n 142 | /* the derivation of this formula is left as an exercise for the reader */\n 143 | MOD63(len2); /* assumes len2 >= 0 */\n 144 | rem = (unsigned)len2;\n 145 | sum1 = adler1 & 0xffff;\n 146 | sum2 = rem * sum1;\n 147 | MOD(sum2);\n 148 | sum1 += (adler2 & 0xffff) + BASE - 1;\n 149 | sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;\n 150 | if (sum1 >= BASE) sum1 -= BASE;\n 151 | if (sum1 >= BASE) sum1 -= BASE;\n 152 | if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);\n 153 | if (sum2 >= BASE) sum2 -= BASE;\n 154 | return sum1 | (sum2 << 16);\n 155 | }\n 156 | \n 157 | /* ========================================================================= */\n 158 | uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {\n 159 | return adler32_combine_(adler1, adler2, len2);\n 160 | }\n 161 | \n 162 | uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {\n 163 | return adler32_combine_(adler1, adler2, len2);\n 164 | }", "src_commits": "[{\"path\":\"/src/extra-cmake-modules\",\"rev\":\"785cc769097051335412b1df5ef8b784112e18d1\",\"url\":\"https://invent.kde.org/frameworks/extra-cmake-modules.git\"},{\"path\":\"/src/karchive\",\"rev\":\"3557ad6e4aeb96ec1b6705f43cc3dcb96d76cd6c\",\"url\":\"https://invent.kde.org/frameworks/karchive.git\"},{\"path\":\"/src/openssl\",\"rev\":\"69e54bee8d89f6703eaeca5f4c8b6a8822161c64\",\"url\":\"https://github.com/openssl/openssl.git\"},{\"path\":\"/src/qtbase\",\"rev\":\"e40473cf5458f18d6321da0fdb82ed18465a3bd8\",\"url\":\"git://code.qt.io/qt/qtbase.git\"},{\"path\":\"/src/xz\",\"rev\":\"ebb0e6789cefe3be71756881aa8f2009fda9938c\",\"url\":\"https://github.com/tukaani-project/xz.git\"},{\"path\":\"/src/zlib\",\"rev\":\"f9dd6009be3ed32415edf1e89d1bc38380ecb95d\",\"url\":\"https://github.com/madler/zlib.git\"},{\"path\":\"/src/zstd\",\"rev\":\"0cdce55f2fbf02990df8681eedb76e32f804fcc8\",\"url\":\"https://github.com/facebook/zstd.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 350, "coverage_keys": "[\"/src/zlib/adler32.c\"]", "target_text": "Reach line at /src/zlib/adler32.c:74 (observed count 350).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-karchive:v2026-07-test1@sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_digest": "sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "karchive:merged:src/karchive/src/k7zip.cpp:294", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "karchive", "harness": "merged", "harness_binaries": "[\"k7z_fuzzer\", \"kar_fuzzer\", \"ktar_bz2_fuzzer\", \"ktar_fuzzer\", \"ktar_gz_fuzzer\", \"ktar_lz_fuzzer\", \"ktar_xz_fuzzer\", \"ktar_zst_fuzzer\", \"kzip_fuzzer\"]", "language": "c++", "file": "/src/karchive/src/k7zip.cpp", "line_start": 294, "line_end": 294, "line_count": 1, "function": "", "source_snippet": " 194 | /*!\n 195 | * Returns the content of this file.\n 196 | * Call data() with care (only once per file), this data isn't cached.\n 197 | */\n 198 | [[nodiscard]] QByteArray data() const override;\n 199 | \n 200 | /*!\n 201 | * This method returns QIODevice (internal class: KLimitedIODevice)\n 202 | * on top of the underlying QIODevice. This is obviously for reading only.\n 203 | *\n 204 | * WARNING: Note that the ownership of the device is being transferred to the caller,\n 205 | * who will have to delete it.\n 206 | *\n 207 | * The returned device auto-opens (in readonly mode), no need to open it.\n 208 | * Returns the QIODevice of the file\n 209 | */\n 210 | [[nodiscard]] QIODevice *createDevice() const override;\n 211 | \n 212 | private:\n 213 | const QByteArray m_data;\n 214 | QBuffer *m_buffer;\n 215 | };\n 216 | \n 217 | K7ZipFileEntry::K7ZipFileEntry(K7Zip *zip,\n 218 | const QString &name,\n 219 | int access,\n 220 | const QDateTime &date,\n 221 | const QString &user,\n 222 | const QString &group,\n 223 | const QString &symlink,\n 224 | qint64 pos,\n 225 | qint64 size,\n 226 | const QByteArray &data)\n 227 | : KArchiveFile(zip, name, access, date, user, group, symlink, pos, size)\n 228 | , m_data(data)\n 229 | , m_buffer(new QBuffer)\n 230 | {\n 231 | m_buffer->setData(m_data);\n 232 | m_buffer->open(QIODevice::ReadOnly);\n 233 | }\n 234 | \n 235 | K7ZipFileEntry::~K7ZipFileEntry()\n 236 | {\n 237 | delete m_buffer;\n 238 | }\n 239 | \n 240 | QByteArray K7ZipFileEntry::data() const\n 241 | {\n 242 | return m_data.mid(position(), size());\n 243 | }\n 244 | \n 245 | QIODevice *K7ZipFileEntry::createDevice() const\n 246 | {\n 247 | return new KLimitedIODevice(m_buffer, position(), size());\n 248 | }\n 249 | \n 250 | class FileInfo\n 251 | {\n 252 | public:\n 253 | FileInfo() = default;\n 254 | \n 255 | QString path;\n 256 | quint64 size = 0;\n 257 | quint32 attributes = 0;\n 258 | quint32 crc = 0;\n 259 | bool attribDefined = false;\n 260 | bool crcDefined = false;\n 261 | bool hasStream = false;\n 262 | bool isDir = false;\n 263 | };\n 264 | \n 265 | class Folder\n 266 | {\n 267 | public:\n 268 | class FolderInfo\n 269 | {\n 270 | public:\n 271 | FolderInfo() = default;\n 272 | \n 273 | [[nodiscard]] bool isSimpleCoder() const\n 274 | {\n 275 | return (numInStreams == 1) && (numOutStreams == 1);\n 276 | }\n 277 | \n 278 | int numInStreams = 0;\n 279 | int numOutStreams = 0;\n 280 | QList<unsigned char> properties;\n 281 | quint64 methodID = 0;\n 282 | };\n 283 | \n 284 | Folder() = default;\n 285 | \n 286 | ~Folder() = default;\n 287 | \n 288 | Q_DISABLE_COPY(Folder)\n 289 | \n 290 | [[nodiscard]] quint64 getUnpackSize() const\n 291 | {\n 292 | if (unpackSizes.isEmpty()) {\n 293 | return 0;\n> 294 | }\n 295 | for (qsizetype i = unpackSizes.size() - 1; i >= 0; i--) {\n 296 | if (findBindPairForOutStream(i) < 0) {\n 297 | return unpackSizes.at(i);\n 298 | }\n 299 | }\n 300 | return 0;\n 301 | }\n 302 | \n 303 | [[nodiscard]] int getNumOutStreams() const\n 304 | {\n 305 | int result = 0;\n 306 | for (const FolderInfo &folderInfo : folderInfos) {\n 307 | result += folderInfo.numOutStreams;\n 308 | }\n 309 | return result;\n 310 | }\n 311 | \n 312 | [[nodiscard]] quint32 getCoderInStreamIndex(quint32 coderIndex) const\n 313 | {\n 314 | quint32 streamIndex = 0;\n 315 | for (quint32 i = 0; i < coderIndex; i++) {\n 316 | streamIndex += folderInfos.at(i).numInStreams;\n 317 | }\n 318 | return streamIndex;\n 319 | }\n 320 | \n 321 | [[nodiscard]] quint32 getCoderOutStreamIndex(quint32 coderIndex) const\n 322 | {\n 323 | quint32 streamIndex = 0;\n 324 | for (quint32 i = 0; i < coderIndex; i++) {\n 325 | streamIndex += folderInfos.at(i).numOutStreams;\n 326 | }\n 327 | return streamIndex;\n 328 | }\n 329 | \n 330 | [[nodiscard]] int findBindPairForInStream(size_t inStreamIndex) const\n 331 | {\n 332 | for (int i = 0; i < inIndexes.size(); i++) {\n 333 | if (inIndexes[i] == inStreamIndex) {\n 334 | return i;\n 335 | }\n 336 | }\n 337 | return -1;\n 338 | }\n 339 | \n 340 | [[nodiscard]] int findBindPairForOutStream(size_t outStreamIndex) const\n 341 | {\n 342 | for (int i = 0; i < outIndexes.size(); i++) {\n 343 | if (outIndexes[i] == outStreamIndex) {\n 344 | return i;\n 345 | }\n 346 | }\n 347 | return -1;\n 348 | }\n 349 | \n 350 | [[nodiscard]] int findPackStreamArrayIndex(size_t inStreamIndex) const\n 351 | {\n 352 | for (int i = 0; i < packedStreams.size(); i++) {\n 353 | if (packedStreams[i] == inStreamIndex) {\n 354 | return i;\n 355 | }\n 356 | }\n 357 | return -1;\n 358 | }\n 359 | \n 360 | void findInStream(quint32 streamIndex, quint32 &coderIndex, quint32 &coderStreamIndex) const\n 361 | {\n 362 | for (coderIndex = 0; coderIndex < (quint32)folderInfos.size(); coderIndex++) {\n 363 | quint32 curSize = folderInfos[coderIndex].numInStreams;\n 364 | if (streamIndex < curSize) {\n 365 | coderStreamIndex = streamIndex;\n 366 | return;\n 367 | }\n 368 | streamIndex -= curSize;\n 369 | }\n 370 | }\n 371 | \n 372 | void findOutStream(quint32 streamIndex, quint32 &coderIndex, quint32 &coderStreamIndex) const\n 373 | {\n 374 | for (coderIndex = 0; coderIndex < (quint32)folderInfos.size(); coderIndex++) {\n 375 | quint32 curSize = folderInfos[coderIndex].numOutStreams;\n 376 | if (streamIndex < curSize) {\n 377 | coderStreamIndex = streamIndex;\n 378 | return;\n 379 | }\n 380 | streamIndex -= curSize;\n 381 | }\n 382 | }\n 383 | \n 384 | [[nodiscard]] bool isEncrypted() const\n 385 | {\n 386 | for (qsizetype i = folderInfos.size() - 1; i >= 0; i--) {\n 387 | if (folderInfos.at(i).methodID == k_AES) {\n 388 | return true;\n 389 | }\n 390 | }\n 391 | return false;\n 392 | }\n 393 | \n 394 | // bool CheckStructure() const;", "src_commits": "[{\"path\":\"/src/extra-cmake-modules\",\"rev\":\"785cc769097051335412b1df5ef8b784112e18d1\",\"url\":\"https://invent.kde.org/frameworks/extra-cmake-modules.git\"},{\"path\":\"/src/karchive\",\"rev\":\"3557ad6e4aeb96ec1b6705f43cc3dcb96d76cd6c\",\"url\":\"https://invent.kde.org/frameworks/karchive.git\"},{\"path\":\"/src/openssl\",\"rev\":\"69e54bee8d89f6703eaeca5f4c8b6a8822161c64\",\"url\":\"https://github.com/openssl/openssl.git\"},{\"path\":\"/src/qtbase\",\"rev\":\"e40473cf5458f18d6321da0fdb82ed18465a3bd8\",\"url\":\"git://code.qt.io/qt/qtbase.git\"},{\"path\":\"/src/xz\",\"rev\":\"ebb0e6789cefe3be71756881aa8f2009fda9938c\",\"url\":\"https://github.com/tukaani-project/xz.git\"},{\"path\":\"/src/zlib\",\"rev\":\"f9dd6009be3ed32415edf1e89d1bc38380ecb95d\",\"url\":\"https://github.com/madler/zlib.git\"},{\"path\":\"/src/zstd\",\"rev\":\"0cdce55f2fbf02990df8681eedb76e32f804fcc8\",\"url\":\"https://github.com/facebook/zstd.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 24, "coverage_keys": "[\"/src/karchive/src/k7zip.cpp\"]", "target_text": "Reach line at /src/karchive/src/k7zip.cpp:294 (observed count 24).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-karchive:v2026-07-test1@sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_digest": "sha256:4c7ea95f50529f13a86fe490cdcd779b3d1c7e699916bda4212dc780d1082665", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "liboqs:merged:src/liboqs/src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c:565", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "liboqs", "harness": "merged", "harness_binaries": "[\"fuzz_test_kem\", \"fuzz_test_sig\", \"fuzz_test_sig_stfl_lms\", \"fuzz_test_sig_stfl_xmss\"]", "language": "c", "file": "/src/liboqs/src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c", "line_start": 565, "line_end": 565, "line_count": 1, "function": "", "source_snippet": " 465 | \t\t\tfor (i = 16; i < laneCount; i++) {\n 466 | \t\t\t\tExtrXor( i );\n 467 | \t\t\t}\n 468 | \t\t}\n 469 | \t} else {\n 470 | \t\tfor (i = 0; i < laneCount; i++) {\n 471 | \t\t\tExtrXor( i );\n 472 | \t\t}\n 473 | \t}\n 474 | #undef ExtrXor\n 475 | #undef ExtrXor4\n 476 | }\n 477 | \n 478 | #define declareABCDE \\\n 479 | V256 Aba, Abe, Abi, Abo, Abu; \\\n 480 | V256 Aga, Age, Agi, Ago, Agu; \\\n 481 | V256 Aka, Ake, Aki, Ako, Aku; \\\n 482 | V256 Ama, Ame, Ami, Amo, Amu; \\\n 483 | V256 Asa, Ase, Asi, Aso, Asu; \\\n 484 | V256 Bba, Bbe, Bbi, Bbo, Bbu; \\\n 485 | V256 Bga, Bge, Bgi, Bgo, Bgu; \\\n 486 | V256 Bka, Bke, Bki, Bko, Bku; \\\n 487 | V256 Bma, Bme, Bmi, Bmo, Bmu; \\\n 488 | V256 Bsa, Bse, Bsi, Bso, Bsu; \\\n 489 | V256 Ca, Ce, Ci, Co, Cu; \\\n 490 | V256 Ca1, Ce1, Ci1, Co1, Cu1; \\\n 491 | V256 Da, De, Di, Do, Du; \\\n 492 | V256 Eba, Ebe, Ebi, Ebo, Ebu; \\\n 493 | V256 Ega, Ege, Egi, Ego, Egu; \\\n 494 | V256 Eka, Eke, Eki, Eko, Eku; \\\n 495 | V256 Ema, Eme, Emi, Emo, Emu; \\\n 496 | V256 Esa, Ese, Esi, Eso, Esu; \\\n 497 | \n 498 | #define prepareTheta \\\n 499 | Ca = XOR256(Aba, XOR256(Aga, XOR256(Aka, XOR256(Ama, Asa)))); \\\n 500 | Ce = XOR256(Abe, XOR256(Age, XOR256(Ake, XOR256(Ame, Ase)))); \\\n 501 | Ci = XOR256(Abi, XOR256(Agi, XOR256(Aki, XOR256(Ami, Asi)))); \\\n 502 | Co = XOR256(Abo, XOR256(Ago, XOR256(Ako, XOR256(Amo, Aso)))); \\\n 503 | Cu = XOR256(Abu, XOR256(Agu, XOR256(Aku, XOR256(Amu, Asu)))); \\\n 504 | \n 505 | /* --- Theta Rho Pi Chi Iota Prepare-theta */\n 506 | /* --- 64-bit lanes mapped to 64-bit words */\n 507 | #define thetaRhoPiChiIotaPrepareTheta(i, A, E) \\\n 508 | ROL64in256(Ce1, Ce, 1); \\\n 509 | Da = XOR256(Cu, Ce1); \\\n 510 | ROL64in256(Ci1, Ci, 1); \\\n 511 | De = XOR256(Ca, Ci1); \\\n 512 | ROL64in256(Co1, Co, 1); \\\n 513 | Di = XOR256(Ce, Co1); \\\n 514 | ROL64in256(Cu1, Cu, 1); \\\n 515 | Do = XOR256(Ci, Cu1); \\\n 516 | ROL64in256(Ca1, Ca, 1); \\\n 517 | Du = XOR256(Co, Ca1); \\\n 518 | \\\n 519 | XOReq256(A##ba, Da); \\\n 520 | Bba = A##ba; \\\n 521 | XOReq256(A##ge, De); \\\n 522 | ROL64in256(Bbe, A##ge, 44); \\\n 523 | XOReq256(A##ki, Di); \\\n 524 | ROL64in256(Bbi, A##ki, 43); \\\n 525 | E##ba = XOR256(Bba, ANDnu256(Bbe, Bbi)); \\\n 526 | XOReq256(E##ba, CONST256_64(KeccakF1600RoundConstants[i])); \\\n 527 | Ca = E##ba; \\\n 528 | XOReq256(A##mo, Do); \\\n 529 | ROL64in256(Bbo, A##mo, 21); \\\n 530 | E##be = XOR256(Bbe, ANDnu256(Bbi, Bbo)); \\\n 531 | Ce = E##be; \\\n 532 | XOReq256(A##su, Du); \\\n 533 | ROL64in256(Bbu, A##su, 14); \\\n 534 | E##bi = XOR256(Bbi, ANDnu256(Bbo, Bbu)); \\\n 535 | Ci = E##bi; \\\n 536 | E##bo = XOR256(Bbo, ANDnu256(Bbu, Bba)); \\\n 537 | Co = E##bo; \\\n 538 | E##bu = XOR256(Bbu, ANDnu256(Bba, Bbe)); \\\n 539 | Cu = E##bu; \\\n 540 | \\\n 541 | XOReq256(A##bo, Do); \\\n 542 | ROL64in256(Bga, A##bo, 28); \\\n 543 | XOReq256(A##gu, Du); \\\n 544 | ROL64in256(Bge, A##gu, 20); \\\n 545 | XOReq256(A##ka, Da); \\\n 546 | ROL64in256(Bgi, A##ka, 3); \\\n 547 | E##ga = XOR256(Bga, ANDnu256(Bge, Bgi)); \\\n 548 | XOReq256(Ca, E##ga); \\\n 549 | XOReq256(A##me, De); \\\n 550 | ROL64in256(Bgo, A##me, 45); \\\n 551 | E##ge = XOR256(Bge, ANDnu256(Bgi, Bgo)); \\\n 552 | XOReq256(Ce, E##ge); \\\n 553 | XOReq256(A##si, Di); \\\n 554 | ROL64in256(Bgu, A##si, 61); \\\n 555 | E##gi = XOR256(Bgi, ANDnu256(Bgo, Bgu)); \\\n 556 | XOReq256(Ci, E##gi); \\\n 557 | E##go = XOR256(Bgo, ANDnu256(Bgu, Bga)); \\\n 558 | XOReq256(Co, E##go); \\\n 559 | E##gu = XOR256(Bgu, ANDnu256(Bga, Bge)); \\\n 560 | XOReq256(Cu, E##gu); \\\n 561 | \\\n 562 | XOReq256(A##be, De); \\\n 563 | ROL64in256(Bka, A##be, 1); \\\n 564 | XOReq256(A##gi, Di); \\\n> 565 | ROL64in256(Bke, A##gi, 6); \\\n 566 | XOReq256(A##ko, Do); \\\n 567 | ROL64in256(Bki, A##ko, 25); \\\n 568 | E##ka = XOR256(Bka, ANDnu256(Bke, Bki)); \\\n 569 | XOReq256(Ca, E##ka); \\\n 570 | XOReq256(A##mu, Du); \\\n 571 | ROL64in256_8(Bko, A##mu); \\\n 572 | E##ke = XOR256(Bke, ANDnu256(Bki, Bko)); \\\n 573 | XOReq256(Ce, E##ke); \\\n 574 | XOReq256(A##sa, Da); \\\n 575 | ROL64in256(Bku, A##sa, 18); \\\n 576 | E##ki = XOR256(Bki, ANDnu256(Bko, Bku)); \\\n 577 | XOReq256(Ci, E##ki); \\\n 578 | E##ko = XOR256(Bko, ANDnu256(Bku, Bka)); \\\n 579 | XOReq256(Co, E##ko); \\\n 580 | E##ku = XOR256(Bku, ANDnu256(Bka, Bke)); \\\n 581 | XOReq256(Cu, E##ku); \\\n 582 | \\\n 583 | XOReq256(A##bu, Du); \\\n 584 | ROL64in256(Bma, A##bu, 27); \\\n 585 | XOReq256(A##ga, Da); \\\n 586 | ROL64in256(Bme, A##ga, 36); \\\n 587 | XOReq256(A##ke, De); \\\n 588 | ROL64in256(Bmi, A##ke, 10); \\\n 589 | E##ma = XOR256(Bma, ANDnu256(Bme, Bmi)); \\\n 590 | XOReq256(Ca, E##ma); \\\n 591 | XOReq256(A##mi, Di); \\\n 592 | ROL64in256(Bmo, A##mi, 15); \\\n 593 | E##me = XOR256(Bme, ANDnu256(Bmi, Bmo)); \\\n 594 | XOReq256(Ce, E##me); \\\n 595 | XOReq256(A##so, Do); \\\n 596 | ROL64in256_56(Bmu, A##so); \\\n 597 | E##mi = XOR256(Bmi, ANDnu256(Bmo, Bmu)); \\\n 598 | XOReq256(Ci, E##mi); \\\n 599 | E##mo = XOR256(Bmo, ANDnu256(Bmu, Bma)); \\\n 600 | XOReq256(Co, E##mo); \\\n 601 | E##mu = XOR256(Bmu, ANDnu256(Bma, Bme)); \\\n 602 | XOReq256(Cu, E##mu); \\\n 603 | \\\n 604 | XOReq256(A##bi, Di); \\\n 605 | ROL64in256(Bsa, A##bi, 62); \\\n 606 | XOReq256(A##go, Do); \\\n 607 | ROL64in256(Bse, A##go, 55); \\\n 608 | XOReq256(A##ku, Du); \\\n 609 | ROL64in256(Bsi, A##ku, 39); \\\n 610 | E##sa = XOR256(Bsa, ANDnu256(Bse, Bsi)); \\\n 611 | XOReq256(Ca, E##sa); \\\n 612 | XOReq256(A##ma, Da); \\\n 613 | ROL64in256(Bso, A##ma, 41); \\\n 614 | E##se = XOR256(Bse, ANDnu256(Bsi, Bso)); \\\n 615 | XOReq256(Ce, E##se); \\\n 616 | XOReq256(A##se, De); \\\n 617 | ROL64in256(Bsu, A##se, 2); \\\n 618 | E##si = XOR256(Bsi, ANDnu256(Bso, Bsu)); \\\n 619 | XOReq256(Ci, E##si); \\\n 620 | E##so = XOR256(Bso, ANDnu256(Bsu, Bsa)); \\\n 621 | XOReq256(Co, E##so); \\\n 622 | E##su = XOR256(Bsu, ANDnu256(Bsa, Bse)); \\\n 623 | XOReq256(Cu, E##su); \\\n 624 | \\\n 625 | \n 626 | /* --- Theta Rho Pi Chi Iota */\n 627 | /* --- 64-bit lanes mapped to 64-bit words */\n 628 | #define thetaRhoPiChiIota(i, A, E) \\\n 629 | ROL64in256(Ce1, Ce, 1); \\\n 630 | Da = XOR256(Cu, Ce1); \\\n 631 | ROL64in256(Ci1, Ci, 1); \\\n 632 | De = XOR256(Ca, Ci1); \\\n 633 | ROL64in256(Co1, Co, 1); \\\n 634 | Di = XOR256(Ce, Co1); \\\n 635 | ROL64in256(Cu1, Cu, 1); \\\n 636 | Do = XOR256(Ci, Cu1); \\\n 637 | ROL64in256(Ca1, Ca, 1); \\\n 638 | Du = XOR256(Co, Ca1); \\\n 639 | \\\n 640 | XOReq256(A##ba, Da); \\\n 641 | Bba = A##ba; \\\n 642 | XOReq256(A##ge, De); \\\n 643 | ROL64in256(Bbe, A##ge, 44); \\\n 644 | XOReq256(A##ki, Di); \\\n 645 | ROL64in256(Bbi, A##ki, 43); \\\n 646 | E##ba = XOR256(Bba, ANDnu256(Bbe, Bbi)); \\\n 647 | XOReq256(E##ba, CONST256_64(KeccakF1600RoundConstants[i])); \\\n 648 | XOReq256(A##mo, Do); \\\n 649 | ROL64in256(Bbo, A##mo, 21); \\\n 650 | E##be = XOR256(Bbe, ANDnu256(Bbi, Bbo)); \\\n 651 | XOReq256(A##su, Du); \\\n 652 | ROL64in256(Bbu, A##su, 14); \\\n 653 | E##bi = XOR256(Bbi, ANDnu256(Bbo, Bbu)); \\\n 654 | E##bo = XOR256(Bbo, ANDnu256(Bbu, Bba)); \\\n 655 | E##bu = XOR256(Bbu, ANDnu256(Bba, Bbe)); \\\n 656 | \\\n 657 | XOReq256(A##bo, Do); \\\n 658 | ROL64in256(Bga, A##bo, 28); \\\n 659 | XOReq256(A##gu, Du); \\\n 660 | ROL64in256(Bge, A##gu, 20); \\\n 661 | XOReq256(A##ka, Da); \\\n 662 | ROL64in256(Bgi, A##ka, 3); \\\n 663 | E##ga = XOR256(Bga, ANDnu256(Bge, Bgi)); \\\n 664 | XOReq256(A##me, De); \\\n 665 | ROL64in256(Bgo, A##me, 45); \\", "src_commits": "[{\"path\":\"/src/liboqs\",\"rev\":\"0e325ccc2d96d37e7433ff8938550d8111b3931c\",\"url\":\"https://github.com/open-quantum-safe/liboqs.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 89200000, "coverage_keys": "[\"/src/liboqs/src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c\"]", "target_text": "Reach line at /src/liboqs/src/common/sha3/xkcp_low/KeccakP-1600times4/avx2/KeccakP-1600-times4-SIMD256.c:565 (observed count 89200000).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-liboqs:v2026-07-test1@sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_digest": "sha256:b00578ef6bc10a015619ddcf614cb217e8a1ecae49b3da9eba084a3db59e604a", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner:ubuntu-24-04", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "libraw:merged:src/libraw/src/decoders/fp_dng.cpp:294", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "libraw", "harness": "merged", "harness_binaries": "[\"libraw_cr2_fuzzer\", \"libraw_fuzzer\", \"libraw_nef_fuzzer\", \"libraw_raf_fuzzer\"]", "language": "c++", "file": "/src/libraw/src/decoders/fp_dng.cpp", "line_start": 294, "line_end": 294, "line_count": 1, "function": "", "source_snippet": " 194 | }\n 195 | }\n 196 | else\n 197 | {\n 198 | #if LibRawBigEndian\n 199 | const unsigned char *input0 = input;\n 200 | const unsigned char *input1 = input + rowIncrement;\n 201 | const unsigned char *input2 = input + rowIncrement * 2;\n 202 | const unsigned char *input3 = input + rowIncrement * 3;\n 203 | #else\n 204 | const unsigned char *input3 = input;\n 205 | const unsigned char *input2 = input + rowIncrement;\n 206 | const unsigned char *input1 = input + rowIncrement * 2;\n 207 | const unsigned char *input0 = input + rowIncrement * 3;\n 208 | #endif\n 209 | for (int col = 0; col < rowIncrement; ++col)\n 210 | {\n 211 | output[0] = input0[col];\n 212 | output[1] = input1[col];\n 213 | output[2] = input2[col];\n 214 | output[3] = input3[col];\n 215 | output += 4;\n 216 | }\n 217 | }\n 218 | }\n 219 | #endif\n 220 | \n 221 | static float expandFloats(unsigned char *dst, int tileWidth, int bytesps)\n 222 | {\n 223 | float max = 0.f;\n 224 | if (bytesps == 2)\n 225 | {\n 226 | uint16_t *dst16 = (ushort *)dst;\n 227 | uint32_t *dst32 = (unsigned int *)dst;\n 228 | float *f32 = (float *)dst;\n 229 | for (int index = tileWidth - 1; index >= 0; --index)\n 230 | {\n 231 | dst32[index] = __DNG_HalfToFloat(dst16[index]);\n 232 | max = MAX(max, f32[index]);\n 233 | }\n 234 | }\n 235 | else if (bytesps == 3)\n 236 | {\n 237 | uint8_t *dst8 = ((unsigned char *)dst) + (tileWidth - 1) * 3;\n 238 | uint32_t *dst32 = (unsigned int *)dst;\n 239 | float *f32 = (float *)dst;\n 240 | for (int index = tileWidth - 1; index >= 0; --index, dst8 -= 3)\n 241 | {\n 242 | dst32[index] = __DNG_FP24ToFloat(dst8);\n 243 | max = MAX(max, f32[index]);\n 244 | }\n 245 | }\n 246 | else if (bytesps == 4)\n 247 | {\n 248 | float *f32 = (float *)dst;\n 249 | for (int index = 0; index < tileWidth; index++)\n 250 | max = MAX(max, f32[index]);\n 251 | }\n 252 | return max;\n 253 | }\n 254 | \n 255 | struct tile_stripe_data_t\n 256 | {\n 257 | bool tiled, striped;\n 258 | int tileCnt;\n 259 | unsigned tileWidth, tileHeight, tilesH, tilesV;\n 260 | INT64 maxBytesInTile;\n 261 | std::vector<INT64> tOffsets, tBytes;\n 262 | tile_stripe_data_t() : tiled(false), striped(false),tileCnt(0),\n 263 | tileWidth(0),tileHeight(0),tilesH(0),tilesV(0),\n 264 | maxBytesInTile(0){}\n 265 | void init(tiff_ifd_t *ifd, const libraw_image_sizes_t&, const unpacker_data_t&,\n 266 | short _order,\n 267 | LibRaw_abstract_datastream *stream);\n 268 | };\n 269 | \n 270 | static unsigned static_get4(LibRaw_abstract_datastream *stream, short _order)\n 271 | {\n 272 | uchar str[4] = { 0xff, 0xff, 0xff, 0xff };\n 273 | stream->read(str, 1, 4);\n 274 | return libraw_sget4_static(_order, str);\n 275 | }\n 276 | \n 277 | \n 278 | void tile_stripe_data_t::init(tiff_ifd_t *ifd, const libraw_image_sizes_t& sizes, \n 279 | const unpacker_data_t& unpacker_data, short _order, LibRaw_abstract_datastream *stream)\n 280 | {\n 281 | tiled = (unpacker_data.tile_width <= sizes.raw_width) && (unpacker_data.tile_length <= sizes.raw_height);\n 282 | striped = (ifd->rows_per_strip > 0 && ifd->rows_per_strip < sizes.raw_height) && ifd->strip_byte_counts_count > 0;\n 283 | \n 284 | tileWidth = tiled ? unpacker_data.tile_width : sizes.raw_width;\n 285 | tileHeight = tiled ? unpacker_data.tile_length :(striped ? ifd->rows_per_strip : sizes.raw_height);\n 286 | tilesH = tiled ? (sizes.raw_width + tileWidth - 1) / tileWidth : 1;\n 287 | tilesV = tiled ? (sizes.raw_height + tileHeight - 1) / tileHeight :\n 288 | (striped ? ((sizes.raw_height + ifd->rows_per_strip - 1) / ifd->rows_per_strip) : 1);\n 289 | tileCnt = tilesH * tilesV;\n 290 | \n 291 | if (tileCnt < 1 || tileCnt > 1000000)\n 292 | throw LIBRAW_EXCEPTION_DECODE_RAW;\n 293 | \n> 294 | tOffsets = std::vector<INT64>(tileCnt,0);\n 295 | tBytes = std::vector <INT64>(tileCnt,0);\n 296 | \n 297 | if (tiled)\n 298 | for (int t = 0; t < tileCnt; ++t)\n 299 | tOffsets[t] = static_get4(stream, _order);\n 300 | else if (striped)\n 301 | for (int t = 0; t < tileCnt && t < ifd->strip_offsets_count; ++t)\n 302 | tOffsets[t] = ifd->strip_offsets[t];\n 303 | else\n 304 | tOffsets[0] = ifd->offset;\n 305 | \n 306 | maxBytesInTile = 0;\n 307 | \n 308 | if (tileCnt == 1 || (!tiled && !striped))\n 309 | tBytes[0] = maxBytesInTile = ifd->bytes;\n 310 | else if (tiled)\n 311 | {\n 312 | // ifd->bytes points to tile size table if more than 1 tile exists\n 313 | stream->seek(ifd->bytes, SEEK_SET);\n 314 | for (int t = 0; t < tileCnt; ++t)\n 315 | {\n 316 | tBytes[t] = static_get4(stream, _order); ;\n 317 | maxBytesInTile = MAX(maxBytesInTile, tBytes[t]);\n 318 | }\n 319 | }\n 320 | else if (striped)\n 321 | for (int t = 0; t < tileCnt && t < ifd->strip_byte_counts_count; ++t)\n 322 | {\n 323 | tBytes[t] = ifd->strip_byte_counts[t];\n 324 | maxBytesInTile = MAX(maxBytesInTile, tBytes[t]);\n 325 | }\n 326 | }\n 327 | \n 328 | #ifdef USE_ZLIB\n 329 | void LibRaw::deflate_dng_load_raw()\n 330 | {\n 331 | int iifd = find_ifd_by_offset(libraw_internal_data.unpacker_data.data_offset);\n 332 | if(iifd < 0 || iifd > (int)libraw_internal_data.identify_data.tiff_nifds)\n 333 | throw LIBRAW_EXCEPTION_DECODE_RAW;\n 334 | struct tiff_ifd_t *ifd = &tiff_ifd[iifd];\n 335 | \n 336 | float *float_raw_image = 0;\n 337 | float max = 0.f;\n 338 | \n 339 | if (ifd->samples != 1 && ifd->samples != 3 && ifd->samples != 4)\n 340 | throw LIBRAW_EXCEPTION_DECODE_RAW; \n 341 | \n 342 | if (libraw_internal_data.unpacker_data.tiff_samples != (unsigned)ifd->samples)\n 343 | throw LIBRAW_EXCEPTION_DECODE_RAW; // Wrong IFD\n 344 | \n 345 | if (imgdata.idata.filters && ifd->samples > 1)\n 346 | throw LIBRAW_EXCEPTION_DECODE_RAW;\n 347 | \n 348 | tile_stripe_data_t tiles;\n 349 | tiles.init(ifd, imgdata.sizes, libraw_internal_data.unpacker_data, libraw_internal_data.unpacker_data.order,\n 350 | libraw_internal_data.internal_data.input);\n 351 | \n 352 | if (tiles.tBytes.size() < 1)\n 353 | \t throw LIBRAW_EXCEPTION_IO_CORRUPT;\n 354 | \n 355 | // Ensure less then 2GB per compressed tile\n 356 | INT64 maxcomprlen = tiles.tBytes[0];\n 357 | for (int i = 1; i < tiles.tBytes.size(); i++)\n 358 | \t maxcomprlen = MAX(maxcomprlen, tiles.tBytes[i]);\n 359 | \n 360 | if(maxcomprlen >= (1LL << 31) || maxcomprlen < 0)\n 361 | \t throw LIBRAW_EXCEPTION_TOOBIG;\n 362 | \n 363 | // Max bytes: 2^16 raw width * 2^2 bytes/pixel * 2^2 channels = 2^20, so check against 2^22\n 364 | INT64 rowbytes = INT64(MAX(tiles.tileWidth, imgdata.sizes.raw_width)) * 4ULL * INT64(ifd->samples);\n 365 | if (rowbytes > (1LL << 22))\n 366 | throw LIBRAW_EXCEPTION_TOOBIG;\n 367 | \n 368 | if (ifd->sample_format == 3)\n 369 | {\n 370 | INT64 raw_bytes = INT64(tiles.tileCnt) * INT64(tiles.tileWidth) * INT64(tiles.tileHeight) * INT64(ifd->samples) * sizeof(float);\n 371 | if (raw_bytes > INT64(imgdata.rawparams.max_raw_memory_mb) * INT64(1024 * 1024))\n 372 | throw LIBRAW_EXCEPTION_TOOBIG;\n 373 | float_raw_image = (float *)calloc(raw_bytes, 1);\n 374 | }\n 375 | else\n 376 | throw LIBRAW_EXCEPTION_DECODE_RAW; // Only float deflated supported\n 377 | \n 378 | int xFactor;\n 379 | switch (ifd->predictor)\n 380 | {\n 381 | case 3:\n 382 | default:\n 383 | xFactor = 1;\n 384 | break;\n 385 | case 34894:\n 386 | xFactor = 2;\n 387 | break;\n 388 | case 34895:\n 389 | xFactor = 4;\n 390 | break;\n 391 | }\n 392 | \n 393 | INT64 tilePixels = INT64(tiles.tileWidth) * INT64(tiles.tileHeight);\n 394 | unsigned pixelSize = sizeof(float) * ifd->samples;", "src_commits": "[{\"path\":\"/src/libraw\",\"rev\":\"f9d5f6565a36abc60e672e2db6e7ca80b6bf642e\",\"url\":\"https://github.com/libraw/libraw\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 754, "coverage_keys": "[\"/src/libraw/src/decoders/fp_dng.cpp\"]", "target_text": "Reach line at /src/libraw/src/decoders/fp_dng.cpp:294 (observed count 754).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-libraw:v2026-07-test1@sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_digest": "sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "libraw:merged:src/libraw/src/decoders/decoders_libraw.cpp:198", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "libraw", "harness": "merged", "harness_binaries": "[\"libraw_cr2_fuzzer\", \"libraw_fuzzer\", \"libraw_nef_fuzzer\", \"libraw_raf_fuzzer\"]", "language": "c++", "file": "/src/libraw/src/decoders/decoders_libraw.cpp", "line_start": 198, "line_end": 198, "line_count": 1, "function": "", "source_snippet": " 98 | }\n 99 | else\n 100 | {\n 101 | move_row = _move[i].row;\n 102 | move_col = _move[i].col;\n 103 | }\n 104 | for (; tidx < 16; tidx++)\n 105 | if (tiff_ifd[tidx].t_width == imgdata.sizes.raw_width &&\n 106 | tiff_ifd[tidx].t_height == imgdata.sizes.raw_height &&\n 107 | tiff_ifd[tidx].bps > 8 && tiff_ifd[tidx].samples == 1)\n 108 | break;\n 109 | if (tidx >= 16)\n 110 | break;\n 111 | imgdata.rawdata.raw_image = plane;\n 112 | ID.input->seek(tiff_ifd[tidx].offset, SEEK_SET);\n 113 | imgdata.idata.filters = 0xb4b4b4b4;\n 114 | libraw_internal_data.unpacker_data.data_offset = tiff_ifd[tidx].offset;\n 115 | (this->*pentax_component_load_raw)();\n 116 | for (int row = 0; row < imgdata.sizes.raw_height - move_row; row++)\n 117 | {\n 118 | int colors[2];\n 119 | for (int c = 0; c < 2; c++)\n 120 | colors[c] = COLOR(row, c);\n 121 | ushort *srcrow = &plane[imgdata.sizes.raw_width * row];\n 122 | ushort(*dstrow)[4] =\n 123 | &result[(imgdata.sizes.raw_width) * (row + move_row) + move_col];\n 124 | for (int col = 0; col < imgdata.sizes.raw_width - move_col; col++)\n 125 | dstrow[col][colors[col % 2]] = srcrow[col];\n 126 | }\n 127 | tidx++;\n 128 | }\n 129 | \n 130 | if (imgdata.color.cblack[4] == 2 && imgdata.color.cblack[5] == 2)\n 131 | for (int c = 0; c < 4; c++)\n 132 | imgdata.color.cblack[FC(c / 2, c % 2)] +=\n 133 | imgdata.color.cblack[6 +\n 134 | c / 2 % imgdata.color.cblack[4] *\n 135 | imgdata.color.cblack[5] +\n 136 | c % 2 % imgdata.color.cblack[5]];\n 137 | imgdata.color.cblack[4] = imgdata.color.cblack[5] = 0;\n 138 | \n 139 | // assign things back:\n 140 | imgdata.sizes.raw_pitch = imgdata.sizes.raw_width * 8;\n 141 | imgdata.idata.filters = 0;\n 142 | imgdata.rawdata.raw_alloc = imgdata.rawdata.color4_image = result;\n 143 | free(plane);\n 144 | imgdata.rawdata.raw_image = 0;\n 145 | }\n 146 | \n 147 | void LibRaw::hasselblad_full_load_raw()\n 148 | {\n 149 | int row, col;\n 150 | \n 151 | for (row = 0; row < S.height; row++)\n 152 | for (col = 0; col < S.width; col++)\n 153 | {\n 154 | read_shorts(&imgdata.image[row * S.width + col][2], 1); // B\n 155 | read_shorts(&imgdata.image[row * S.width + col][1], 1); // G\n 156 | read_shorts(&imgdata.image[row * S.width + col][0], 1); // R\n 157 | }\n 158 | }\n 159 | \n 160 | static inline void unpack7bytesto4x16(unsigned char *src, unsigned short *dest)\n 161 | {\n 162 | dest[0] = (src[0] << 6) | (src[1] >> 2);\n 163 | dest[1] = ((src[1] & 0x3) << 12) | (src[2] << 4) | (src[3] >> 4);\n 164 | dest[2] = (src[3] & 0xf) << 10 | (src[4] << 2) | (src[5] >> 6);\n 165 | dest[3] = ((src[5] & 0x3f) << 8) | src[6];\n 166 | }\n 167 | \n 168 | static inline void unpack28bytesto16x16ns(unsigned char *src,\n 169 | unsigned short *dest)\n 170 | {\n 171 | dest[0] = (src[3] << 6) | (src[2] >> 2);\n 172 | dest[1] = ((src[2] & 0x3) << 12) | (src[1] << 4) | (src[0] >> 4);\n 173 | dest[2] = (src[0] & 0xf) << 10 | (src[7] << 2) | (src[6] >> 6);\n 174 | dest[3] = ((src[6] & 0x3f) << 8) | src[5];\n 175 | dest[4] = (src[4] << 6) | (src[11] >> 2);\n 176 | dest[5] = ((src[11] & 0x3) << 12) | (src[10] << 4) | (src[9] >> 4);\n 177 | dest[6] = (src[9] & 0xf) << 10 | (src[8] << 2) | (src[15] >> 6);\n 178 | dest[7] = ((src[15] & 0x3f) << 8) | src[14];\n 179 | dest[8] = (src[13] << 6) | (src[12] >> 2);\n 180 | dest[9] = ((src[12] & 0x3) << 12) | (src[19] << 4) | (src[18] >> 4);\n 181 | dest[10] = (src[18] & 0xf) << 10 | (src[17] << 2) | (src[16] >> 6);\n 182 | dest[11] = ((src[16] & 0x3f) << 8) | src[23];\n 183 | dest[12] = (src[22] << 6) | (src[21] >> 2);\n 184 | dest[13] = ((src[21] & 0x3) << 12) | (src[20] << 4) | (src[27] >> 4);\n 185 | dest[14] = (src[27] & 0xf) << 10 | (src[26] << 2) | (src[25] >> 6);\n 186 | dest[15] = ((src[25] & 0x3f) << 8) | src[24];\n 187 | }\n 188 | \n 189 | #define swab32(x) \\\n 190 | ((unsigned int)((((unsigned int)(x) & (unsigned int)0x000000ffUL) << 24) | \\\n 191 | (((unsigned int)(x) & (unsigned int)0x0000ff00UL) << 8) | \\\n 192 | (((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \\\n 193 | (((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24)))\n 194 | \n 195 | static inline void swab32arr(unsigned *arr, unsigned len)\n 196 | {\n 197 | for (unsigned i = 0; i < len; i++)\n> 198 | arr[i] = swab32(arr[i]);\n 199 | }\n 200 | #undef swab32\n 201 | \n 202 | static inline void unpack7bytesto4x16_nikon(unsigned char *src,\n 203 | unsigned short *dest)\n 204 | {\n 205 | dest[3] = (src[6] << 6) | (src[5] >> 2);\n 206 | dest[2] = ((src[5] & 0x3) << 12) | (src[4] << 4) | (src[3] >> 4);\n 207 | dest[1] = (src[3] & 0xf) << 10 | (src[2] << 2) | (src[1] >> 6);\n 208 | dest[0] = ((src[1] & 0x3f) << 8) | src[0];\n 209 | }\n 210 | \n 211 | static inline void unpack21bytesto12x16_nikon(unsigned char *src, unsigned short (*dest)[4])\n 212 | {\n 213 | \t// bytes 0-6\n 214 | dest[0][0] = ((src[1] & 0x3f) << 8) | src[0];\n 215 | dest[0][1] = (src[3] & 0xf) << 10 | (src[2] << 2) | (src[1] >> 6);\n 216 | dest[0][2] = ((src[5] & 0x3) << 12) | (src[4] << 4) | (src[3] >> 4);\n 217 | dest[1][0] = (src[6] << 6) | (src[5] >> 2);\n 218 | // bytes 7-13\n 219 | dest[1][1] = ((src[8] & 0x3f) << 8) | src[7];\n 220 | dest[1][2] = (src[10] & 0xf) << 10 | (src[9] << 2) | (src[8] >> 6);\n 221 | dest[2][0] = ((src[12] & 0x3) << 12) | (src[11] << 4) | (src[10] >> 4);\n 222 | dest[2][1] = (src[13] << 6) | (src[12] >> 2);\n 223 | // bytes 14-20\n 224 | dest[2][2] = ((src[15] & 0x3f) << 8) | src[14];\n 225 | dest[3][0] = (src[17] & 0xf) << 10 | (src[16] << 2) | (src[15] >> 6);\n 226 | dest[3][1] = ((src[19] & 0x3) << 12) | (src[18] << 4) | (src[17] >> 4);\n 227 | dest[3][2] = (src[20] << 6) | (src[19] >> 2);\n 228 | }\n 229 | \n 230 | \n 231 | void LibRaw::nikon_14bit_load_raw()\n 232 | {\n 233 | int cps = (imgdata.idata.filters == 0 && imgdata.idata.colors == 3) ? 3 : 1;\n 234 | \n 235 | if (cps == 1 && !imgdata.rawdata.raw_image)\n 236 | \t throw LIBRAW_EXCEPTION_DECODE_RAW;\n 237 | if(cps == 3 && !imgdata.image)\n 238 | throw LIBRAW_EXCEPTION_DECODE_RAW;\n 239 | \n 240 | const unsigned linelen =\n 241 | (unsigned)(ceilf((float)(S.raw_width * cps * 7 / 4) / 16.0f)) *\n 242 | 16; // 14512; // S.raw_width * 7 / 4;\n 243 | const unsigned pitch = S.raw_pitch ? S.raw_pitch /( (cps>=3)? 8 : 2) : S.raw_width;\n 244 | unsigned char *buf = (unsigned char *)calloc(linelen,1);\n 245 | for (int row = 0; row < S.raw_height; row++)\n 246 | {\n 247 | unsigned bytesread =\n 248 | libraw_internal_data.internal_data.input->read(buf, 1, linelen);\n 249 | \tif (cps == 1)\n 250 | \t{\n 251 | \t\tunsigned short *dest = &imgdata.rawdata.raw_image[pitch * row];\n 252 | \t\t// swab32arr((unsigned *)buf, bytesread / 4);\n 253 | \t\tfor (unsigned int sp = 0, dp = 0;\n 254 | \t\t\tdp < pitch - 3 && sp < linelen - 6 && sp < bytesread - 6;\n 255 | \t\t\tsp += 7, dp += 4)\n 256 | \t\t\tunpack7bytesto4x16_nikon(buf + sp, dest + dp);\n 257 | \t}\n 258 | \telse if (cps == 3)\n 259 | \t{\n 260 | unsigned short (*dest)[4] = &imgdata.image[pitch * row];\n 261 | // swab32arr((unsigned *)buf, bytesread / 4);\n 262 | for (unsigned int sp = 0, dp = 0; \n 263 | \t\t dp < pitch - 3 && sp < linelen - 20 && sp < bytesread - 20; \n 264 | \t\t sp += 21, dp += 4)\n 265 | unpack21bytesto12x16_nikon(buf + sp, dest + dp);\n 266 | \t}\n 267 | }\n 268 | free(buf);\n 269 | }\n 270 | \n 271 | void LibRaw::fuji_14bit_load_raw()\n 272 | {\n 273 | const unsigned linelen = S.raw_width * 7 / 4;\n 274 | const unsigned pitch = S.raw_pitch ? S.raw_pitch / 2 : S.raw_width;\n 275 | unsigned char *buf = (unsigned char *)calloc(linelen,1);\n 276 | \n 277 | for (int row = 0; row < S.raw_height; row++)\n 278 | {\n 279 | unsigned bytesread =\n 280 | libraw_internal_data.internal_data.input->read(buf, 1, linelen);\n 281 | unsigned short *dest = &imgdata.rawdata.raw_image[pitch * row];\n 282 | if (bytesread % 28)\n 283 | {\n 284 | swab32arr((unsigned *)buf, bytesread / 4);\n 285 | for (unsigned int sp = 0, dp = 0;\n 286 | dp < pitch - 3 && sp < linelen - 6 && sp < bytesread - 6;\n 287 | sp += 7, dp += 4)\n 288 | unpack7bytesto4x16(buf + sp, dest + dp);\n 289 | }\n 290 | else\n 291 | for (unsigned int sp = 0, dp = 0;\n 292 | dp < pitch - 15 && sp < linelen - 27 && sp < bytesread - 27;\n 293 | sp += 28, dp += 16)\n 294 | unpack28bytesto16x16ns(buf + sp, dest + dp);\n 295 | }\n 296 | free(buf);\n 297 | }\n 298 | void LibRaw::nikon_load_padded_packed_raw() // 12 bit per pixel, padded to 16", "src_commits": "[{\"path\":\"/src/libraw\",\"rev\":\"f9d5f6565a36abc60e672e2db6e7ca80b6bf642e\",\"url\":\"https://github.com/libraw/libraw\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 10700, "coverage_keys": "[\"/src/libraw/src/decoders/decoders_libraw.cpp\"]", "target_text": "Reach line at /src/libraw/src/decoders/decoders_libraw.cpp:198 (observed count 10700).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-libraw:v2026-07-test1@sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_digest": "sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "libraw:merged:src/libraw/src/decoders/load_mfbacks.cpp:740", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "libraw", "harness": "merged", "harness_binaries": "[\"libraw_cr2_fuzzer\", \"libraw_fuzzer\", \"libraw_nef_fuzzer\", \"libraw_raf_fuzzer\"]", "language": "c++", "file": "/src/libraw/src/decoders/load_mfbacks.cpp", "line_start": 740, "line_end": 740, "line_count": 1, "function": "", "source_snippet": " 640 | int *offset, len[2], pred[2], row, col, i, j;\n 641 | ushort *pixel;\n 642 | short(*c_black)[2], (*r_black)[2];\n 643 | if (ph1.format == 6)\n 644 | throw LIBRAW_EXCEPTION_IO_CORRUPT;\n 645 | \n 646 | pixel = (ushort *)calloc(raw_width * 3 + raw_height * 4, 2);\n 647 | offset = (int *)(pixel + raw_width);\n 648 | fseek(ifp, strip_offset, SEEK_SET);\n 649 | for (row = 0; row < raw_height; row++)\n 650 | offset[row] = get4();\n 651 | c_black = (short(*)[2])(offset + raw_height);\n 652 | fseek(ifp, ph1.black_col, SEEK_SET);\n 653 | if (ph1.black_col)\n 654 | read_shorts((ushort *)c_black[0], raw_height * 2);\n 655 | r_black = c_black + raw_height;\n 656 | fseek(ifp, ph1.black_row, SEEK_SET);\n 657 | if (ph1.black_row)\n 658 | read_shorts((ushort *)r_black[0], raw_width * 2);\n 659 | \n 660 | // Copy data to internal copy (ever if not read)\n 661 | if (ph1.black_col || ph1.black_row)\n 662 | {\n 663 | imgdata.rawdata.ph1_cblack =\n 664 | (short(*)[2])calloc(raw_height * 2, sizeof(ushort));\n 665 | memmove(imgdata.rawdata.ph1_cblack, (ushort *)c_black[0],\n 666 | raw_height * 2 * sizeof(ushort));\n 667 | imgdata.rawdata.ph1_rblack =\n 668 | (short(*)[2])calloc(raw_width * 2, sizeof(ushort));\n 669 | memmove(imgdata.rawdata.ph1_rblack, (ushort *)r_black[0],\n 670 | raw_width * 2 * sizeof(ushort));\n 671 | }\n 672 | \n 673 | for (i = 0; i < 256; i++)\n 674 | curve[i] = ushort(float(i * i) / 3.969f + 0.5f);\n 675 | try\n 676 | {\n 677 | for (row = 0; row < raw_height; row++)\n 678 | {\n 679 | checkCancel();\n 680 | fseek(ifp, data_offset + offset[row], SEEK_SET);\n 681 | ph1_bits(-1);\n 682 | pred[0] = pred[1] = 0;\n 683 | for (col = 0; col < raw_width; col++)\n 684 | {\n 685 | if (col >= (raw_width & -8))\n 686 | len[0] = len[1] = 14;\n 687 | else if ((col & 7) == 0)\n 688 | for (i = 0; i < 2; i++)\n 689 | {\n 690 | for (j = 0; j < 5 && !ph1_bits(1); j++)\n 691 | ;\n 692 | if (j--)\n 693 | len[i] = length[j * 2 + ph1_bits(1)];\n 694 | }\n 695 | if ((i = len[col & 1]) == 14)\n 696 | pixel[col] = pred[col & 1] = ph1_bits(16);\n 697 | else\n 698 | pixel[col] = pred[col & 1] += ph1_bits(i) + 1 - (1 << (i - 1));\n 699 | if (pred[col & 1] >> 16)\n 700 | derror();\n 701 | if (ph1.format == 5 && pixel[col] < 256)\n 702 | pixel[col] = curve[pixel[col]];\n 703 | }\n 704 | if (ph1.format == 8)\n 705 | memmove(&RAW(row, 0), &pixel[0], raw_width * 2);\n 706 | else\n 707 | for (col = 0; col < raw_width; col++)\n 708 | RAW(row, col) = pixel[col] << 2;\n 709 | }\n 710 | }\n 711 | catch (...)\n 712 | {\n 713 | free(pixel);\n 714 | throw;\n 715 | }\n 716 | free(pixel);\n 717 | maximum = 0xfffc - ph1.t_black;\n 718 | }\n 719 | \n 720 | void LibRaw::hasselblad_load_raw()\n 721 | {\n 722 | struct jhead jh;\n 723 | int shot, row, col, *back[5]={0,0,0,0,0},\n 724 | \t len[2], diff[12], pred, sh, f, c;\n 725 | unsigned s;\n 726 | unsigned upix, urow, ucol;\n 727 | ushort *ip;\n 728 | \n 729 | if (!ljpeg_start(&jh, 0))\n 730 | return;\n 731 | order = 0x4949;\n 732 | ph1_bits(-1);\n 733 | try\n 734 | {\n 735 | back[4] = (int *)calloc(raw_width, 3 * sizeof **back);\n 736 | FORC3 back[c] = back[4] + c * raw_width;\n 737 | cblack[6] >>= sh = tiff_samples > 1;\n 738 | shot = LIM(shot_select, 1, tiff_samples) - 1;\n 739 | for (row = 0; row < raw_height; row++)\n> 740 | {\n 741 | checkCancel();\n 742 | FORC4 back[(c + 3) & 3] = back[c];\n 743 | for (col = 0; col < raw_width; col += 2)\n 744 | {\n 745 | for (s = 0; s < tiff_samples * 2; s += 2)\n 746 | {\n 747 | FORC(2) len[c] = ph1_huff(jh.huff[0]);\n 748 | FORC(2)\n 749 | {\n 750 | diff[s + c] = ph1_bits(len[c]);\n 751 | if (len[c] > 0 && (diff[s + c] & (1 << (len[c] - 1))) == 0)\n 752 | diff[s + c] -= (1 << len[c]) - 1;\n 753 | if (diff[s + c] == 65535)\n 754 | diff[s + c] = -32768;\n 755 | }\n 756 | }\n 757 | for (s = col; s < unsigned(col + 2); s++)\n 758 | {\n 759 | pred = 0x8000 + load_flags;\n 760 | if (col)\n 761 | pred = back[2][s - 2];\n 762 | if (col && row > 1)\n 763 | switch (jh.psv)\n 764 | {\n 765 | case 11:\n 766 | pred += back[0][s] / 2 - back[0][s - 2] / 2;\n 767 | break;\n 768 | }\n 769 | f = (row & 1) * 3 ^ ((col + s) & 1);\n 770 | FORC(int(tiff_samples))\n 771 | {\n 772 | pred += diff[(s & 1) * tiff_samples + c];\n 773 | upix = pred >> sh & 0xffff;\n 774 | if (raw_image && c == shot)\n 775 | RAW(row, s) = upix;\n 776 | if (image)\n 777 | {\n 778 | urow = row - top_margin + (c & 1);\n 779 | ucol = col - left_margin - ((c >> 1) & 1);\n 780 | ip = &image[urow * width + ucol][f];\n 781 | if (urow < height && ucol < width)\n 782 | *ip = c < 4 ? upix : (*ip + upix) >> 1;\n 783 | }\n 784 | }\n 785 | back[2][s] = pred;\n 786 | }\n 787 | }\n 788 | }\n 789 | }\n 790 | catch (...)\n 791 | {\n 792 | if(back[4])\n 793 | \tfree(back[4]);\n 794 | ljpeg_end(&jh);\n 795 | throw;\n 796 | }\n 797 | if(back[4])\n 798 | free(back[4]);\n 799 | ljpeg_end(&jh);\n 800 | if (image)\n 801 | mix_green = 1;\n 802 | }\n 803 | \n 804 | void LibRaw::leaf_hdr_load_raw()\n 805 | {\n 806 | ushort *pixel = 0;\n 807 | unsigned tile = 0, r, c, row, col;\n 808 | \n 809 | if (!filters || !raw_image)\n 810 | {\n 811 | if (!image)\n 812 | throw LIBRAW_EXCEPTION_IO_CORRUPT;\n 813 | pixel = (ushort *)calloc(raw_width, sizeof *pixel);\n 814 | }\n 815 | try\n 816 | {\n 817 | FORC(tiff_samples)\n 818 | for (r = 0; r < raw_height; r++)\n 819 | {\n 820 | checkCancel();\n 821 | if (r % tile_length == 0)\n 822 | {\n 823 | fseek(ifp, data_offset + 4 * tile++, SEEK_SET);\n 824 | fseek(ifp, get4(), SEEK_SET);\n 825 | }\n 826 | if (filters && c != shot_select)\n 827 | continue;\n 828 | if (filters && raw_image)\n 829 | pixel = raw_image + r * raw_width;\n 830 | read_shorts(pixel, raw_width);\n 831 | if (!filters && image && (row = r - top_margin) < height)\n 832 | for (col = 0; col < width && col + left_margin < raw_width; col++)\n 833 | image[row * width + col][c] = pixel[col + left_margin];\n 834 | }\n 835 | }\n 836 | catch (...)\n 837 | {\n 838 | if (!filters)\n 839 | free(pixel);\n 840 | throw;", "src_commits": "[{\"path\":\"/src/libraw\",\"rev\":\"f9d5f6565a36abc60e672e2db6e7ca80b6bf642e\",\"url\":\"https://github.com/libraw/libraw\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 439000, "coverage_keys": "[\"/src/libraw/src/decoders/load_mfbacks.cpp\"]", "target_text": "Reach line at /src/libraw/src/decoders/load_mfbacks.cpp:740 (observed count 439000).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-libraw:v2026-07-test1@sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_digest": "sha256:faa3f5de1db16c0f6b9968ee796375be742b5d8b30f6659ad6150a347c076133", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "rdkit:merged:src/rdkit/Code/GraphMol/FileParsers/MolFileParser.cpp:3287", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "rdkit", "harness": "merged", "harness_binaries": "[\"mol_data_stream_to_mol_fuzzer\", \"mol_deserialization_fuzzer\", \"smiles_string_to_mol_fuzzer\"]", "language": "c++", "file": "/src/rdkit/Code/GraphMol/FileParsers/MolFileParser.cpp", "line_start": 3287, "line_end": 3287, "line_count": 1, "function": "", "source_snippet": " 3187 | if (ival == 15 // V2000\n 3188 | || ival == -1 // v3000\n 3189 | ) {\n 3190 | atom->setNumExplicitHs(0);\n 3191 | } else {\n 3192 | if (static_cast<int>(atom->getValence(Atom::ValenceType::EXPLICIT)) >\n 3193 | ival) {\n 3194 | BOOST_LOG(rdWarningLog)\n 3195 | << \"atom \" << atom->getIdx() << \" has specified valence (\" << ival\n 3196 | << \") smaller than the drawn valence \"\n 3197 | << atom->getValence(Atom::ValenceType::EXPLICIT) << \".\"\n 3198 | << std::endl;\n 3199 | atom->setNumExplicitHs(0);\n 3200 | } else {\n 3201 | atom->setNumExplicitHs(ival -\n 3202 | atom->getValence(Atom::ValenceType::EXPLICIT));\n 3203 | }\n 3204 | }\n 3205 | }\n 3206 | atom->clearProp(common_properties::molTotValence);\n 3207 | }\n 3208 | processSGroups(mol);\n 3209 | }\n 3210 | \n 3211 | } // namespace\n 3212 | namespace FileParserUtils {\n 3213 | bool ParseV3000CTAB(std::istream *inStream, unsigned int &line, RWMol *mol,\n 3214 | Conformer *&conf, bool &chiralityPossible,\n 3215 | unsigned int &nAtoms, unsigned int &nBonds,\n 3216 | bool strictParsing, bool expectMEND,\n 3217 | bool expectMacroAtoms) {\n 3218 | PRECONDITION(inStream, \"bad stream\");\n 3219 | PRECONDITION(mol, \"bad molecule\");\n 3220 | \n 3221 | std::string tempStr;\n 3222 | std::vector<std::string> splitLine;\n 3223 | \n 3224 | bool fileComplete = false;\n 3225 | \n 3226 | tempStr = getV3000Line(inStream, line);\n 3227 | boost::to_upper(tempStr);\n 3228 | if (tempStr.length() < 10 || tempStr.substr(0, 10) != \"BEGIN CTAB\") {\n 3229 | std::ostringstream errout;\n 3230 | errout << \"BEGIN CTAB line not found on line \" << line;\n 3231 | throw FileParseException(errout.str());\n 3232 | }\n 3233 | \n 3234 | tempStr = getV3000Line(inStream, line);\n 3235 | boost::to_upper(tempStr);\n 3236 | if (tempStr.size() < 8 || tempStr.substr(0, 7) != \"COUNTS \") {\n 3237 | std::ostringstream errout;\n 3238 | errout << \"Bad counts line : '\" << tempStr << \"' on line \" << line;\n 3239 | throw FileParseException(errout.str());\n 3240 | }\n 3241 | std::string trimmed =\n 3242 | boost::trim_copy(tempStr.substr(7, tempStr.length() - 7));\n 3243 | boost::split(splitLine, trimmed, boost::is_any_of(\" \\t\"),\n 3244 | boost::token_compress_on);\n 3245 | if (splitLine.size() < 2) {\n 3246 | std::ostringstream errout;\n 3247 | errout << \"Bad counts line : '\" << tempStr << \"' on line \" << line;\n 3248 | throw FileParseException(errout.str());\n 3249 | }\n 3250 | \n 3251 | nAtoms = FileParserUtils::toUnsigned(splitLine[0]);\n 3252 | nBonds = FileParserUtils::toUnsigned(splitLine[1]);\n 3253 | conf = new Conformer(nAtoms);\n 3254 | \n 3255 | unsigned int nSgroups = 0, n3DConstraints = 0, chiralFlag = 0;\n 3256 | \n 3257 | if (splitLine.size() > 2) {\n 3258 | nSgroups = FileParserUtils::toUnsigned(splitLine[2]);\n 3259 | }\n 3260 | if (splitLine.size() > 3) {\n 3261 | n3DConstraints = FileParserUtils::toUnsigned(splitLine[3]);\n 3262 | }\n 3263 | if (splitLine.size() > 4) {\n 3264 | chiralFlag = FileParserUtils::toUnsigned(splitLine[4]);\n 3265 | }\n 3266 | \n 3267 | mol->setProp(common_properties::_MolFileChiralFlag, chiralFlag);\n 3268 | \n 3269 | if (nAtoms) {\n 3270 | ParseV3000AtomBlock(inStream, line, nAtoms, mol, conf, strictParsing,\n 3271 | expectMacroAtoms);\n 3272 | }\n 3273 | if (nBonds) {\n 3274 | ParseV3000BondBlock(inStream, line, nBonds, mol, chiralityPossible);\n 3275 | }\n 3276 | \n 3277 | tempStr = getV3000Line(inStream, line);\n 3278 | // do link nodes:\n 3279 | boost::to_upper(tempStr);\n 3280 | while (tempStr.length() > 8 && tempStr.substr(0, 8) == \"LINKNODE\") {\n 3281 | boost::to_upper(tempStr);\n 3282 | // if the line has nothing on it we just ignore it\n 3283 | if (tempStr.size() > 9) {\n 3284 | std::string existing = \"\";\n 3285 | if (mol->getPropIfPresent(common_properties::molFileLinkNodes,\n 3286 | existing)) {\n> 3287 | existing += \"|\";\n 3288 | }\n 3289 | existing += tempStr.substr(9); // skip the \"LINKNODE \"\n 3290 | mol->setProp(common_properties::molFileLinkNodes, existing);\n 3291 | }\n 3292 | tempStr = getV3000Line(inStream, line);\n 3293 | }\n 3294 | \n 3295 | bool sgroupFound = false;\n 3296 | bool obj3dFound = false;\n 3297 | boost::to_upper(tempStr);\n 3298 | while (tempStr.length() > 5 && tempStr.substr(0, 5) == \"BEGIN\") {\n 3299 | if (tempStr.length() >= 12 && tempStr.substr(0, 12) == \"BEGIN SGROUP\") {\n 3300 | if (sgroupFound) {\n 3301 | std::ostringstream errout;\n 3302 | errout << \"BEGIN SGROUP found more than once on line \" << line;\n 3303 | throw FileParseException(errout.str());\n 3304 | \n 3305 | } else if (!nSgroups) {\n 3306 | std::ostringstream errout;\n 3307 | errout << \"BEGIN SGROUP found but Sgroups NOT expected on line \"\n 3308 | << line;\n 3309 | if (strictParsing) {\n 3310 | throw FileParseException(errout.str());\n 3311 | } else {\n 3312 | BOOST_LOG(rdWarningLog) << errout.str() << std::endl;\n 3313 | // Prepare to read a lot of sgroups\n 3314 | nSgroups = std::numeric_limits<unsigned int>::max();\n 3315 | }\n 3316 | }\n 3317 | sgroupFound = true;\n 3318 | tempStr =\n 3319 | ParseV3000SGroupsBlock(inStream, line, nSgroups, mol, strictParsing);\n 3320 | boost::to_upper(tempStr);\n 3321 | if (tempStr.length() < 10 || tempStr.substr(0, 10) != \"END SGROUP\") {\n 3322 | std::ostringstream errout;\n 3323 | errout << \"END SGROUP line not found on line \" << line;\n 3324 | if (strictParsing) {\n 3325 | throw FileParseException(errout.str());\n 3326 | } else {\n 3327 | BOOST_LOG(rdWarningLog) << errout.str() << std::endl;\n 3328 | }\n 3329 | } else {\n 3330 | tempStr = getV3000Line(inStream, line);\n 3331 | boost::to_upper(tempStr);\n 3332 | }\n 3333 | \n 3334 | } else if (tempStr.length() >= 15 &&\n 3335 | tempStr.substr(6, 10) == \"COLLECTION\") {\n 3336 | tempStr = parseEnhancedStereo(inStream, line, mol, strictParsing);\n 3337 | boost::to_upper(tempStr);\n 3338 | } else if (tempStr.length() >= 11 &&\n 3339 | tempStr.substr(0, 11) == \"BEGIN OBJ3D\") {\n 3340 | if (obj3dFound) {\n 3341 | std::ostringstream errout;\n 3342 | errout << \"BEGIN OBJ3D found more than once on line \" << line;\n 3343 | throw FileParseException(errout.str());\n 3344 | }\n 3345 | if (!n3DConstraints) {\n 3346 | std::ostringstream errout;\n 3347 | errout << \"BEGIN OBJ3D found but 3n3DConstraints NOT expected on line \"\n 3348 | << line;\n 3349 | if (strictParsing) {\n 3350 | throw FileParseException(errout.str());\n 3351 | } else {\n 3352 | BOOST_LOG(rdWarningLog) << errout.str() << std::endl;\n 3353 | }\n 3354 | }\n 3355 | BOOST_LOG(rdWarningLog)\n 3356 | << \"3D constraint information in mol block ignored at line \" << line\n 3357 | << std::endl;\n 3358 | obj3dFound = true;\n 3359 | for (unsigned int i = 0; i < n3DConstraints; ++i) {\n 3360 | tempStr = getV3000Line(inStream, line);\n 3361 | }\n 3362 | tempStr = getV3000Line(inStream, line);\n 3363 | boost::to_upper(tempStr);\n 3364 | if (tempStr.length() < 9 || tempStr.substr(0, 9) != \"END OBJ3D\") {\n 3365 | std::ostringstream errout;\n 3366 | errout << \"END OBJ3D line not found on line \" << line;\n 3367 | if (strictParsing) {\n 3368 | throw FileParseException(errout.str());\n 3369 | } else {\n 3370 | BOOST_LOG(rdWarningLog) << errout.str() << std::endl;\n 3371 | }\n 3372 | }\n 3373 | tempStr = getV3000Line(inStream, line);\n 3374 | boost::to_upper(tempStr);\n 3375 | } else {\n 3376 | // skip blocks we don't know how to read\n 3377 | BOOST_LOG(rdWarningLog) << \"skipping block at line \" << line << \": '\"\n 3378 | << tempStr << \"'\" << std::endl;\n 3379 | while (tempStr.length() < 3 || tempStr.substr(0, 3) != \"END\") {\n 3380 | tempStr = getV3000Line(inStream, line);\n 3381 | }\n 3382 | tempStr = getV3000Line(inStream, line);\n 3383 | boost::to_upper(tempStr);\n 3384 | }\n 3385 | }\n 3386 | \n 3387 | if (nSgroups && !sgroupFound) {", "src_commits": "[{\"path\":\"/src/eigen\",\"rev\":\"2cf9891537250255f50df5109ffe9e700e2a73de\",\"url\":\"https://gitlab.com/libeigen/eigen\"},{\"path\":\"/src/rdkit\",\"rev\":\"232e4ffc84de1983918e6422fbec47d5da74db25\",\"url\":\"https://github.com/rdkit/rdkit.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 1420, "coverage_keys": "[\"/src/rdkit/Code/GraphMol/FileParsers/MolFileParser.cpp\"]", "target_text": "Reach line at /src/rdkit/Code/GraphMol/FileParsers/MolFileParser.cpp:3287 (observed count 1420).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-rdkit:v2026-07-test1@sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_digest": "sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "rdkit:merged:src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp:460", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "rdkit", "harness": "merged", "harness_binaries": "[\"mol_data_stream_to_mol_fuzzer\", \"mol_deserialization_fuzzer\", \"smiles_string_to_mol_fuzzer\"]", "language": "c++", "file": "/src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp", "line_start": 460, "line_end": 460, "line_count": 1, "function": "", "source_snippet": " 360 | unsigned int pos = 6;\n 361 | bool ok;\n 362 | unsigned int nent =\n 363 | ParseSGroupIntField(ok, strictParsing, text, line, pos, true);\n 364 | if (!ok) {\n 365 | return;\n 366 | }\n 367 | \n 368 | for (unsigned int ie = 0; ie < nent; ++ie) {\n 369 | if (text.size() < pos + 8) {\n 370 | std::ostringstream errout;\n 371 | errout << \"SGroup SLB line too short: '\" << text << \"' on line \" << line;\n 372 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 373 | return;\n 374 | }\n 375 | \n 376 | unsigned int sgIdx =\n 377 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 378 | if (!ok) {\n 379 | return;\n 380 | }\n 381 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 382 | if (!sgroup) {\n 383 | return;\n 384 | }\n 385 | unsigned int id = ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 386 | if (!ok) {\n 387 | sgroup->setIsValid(false);\n 388 | return;\n 389 | }\n 390 | if (id != 0 && !SubstanceGroupChecks::isSubstanceGroupIdFree(*mol, id)) {\n 391 | std::ostringstream errout;\n 392 | errout << \"SGroup ID '\" << id\n 393 | << \"' is assigned to more than one SGroup, on line \" << line;\n 394 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 395 | sgroup->setIsValid(false);\n 396 | return;\n 397 | }\n 398 | \n 399 | sgroup->setProp<unsigned int>(\"ID\", id);\n 400 | }\n 401 | }\n 402 | \n 403 | void ParseSGroupV2000SCNLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 404 | const std::string &text, unsigned int line,\n 405 | bool strictParsing) {\n 406 | PRECONDITION(mol, \"bad mol\");\n 407 | PRECONDITION(text.substr(0, 6) == \"M SCN\", \"bad SCN line\");\n 408 | \n 409 | unsigned int pos = 6;\n 410 | bool ok;\n 411 | unsigned int nent =\n 412 | ParseSGroupIntField(ok, strictParsing, text, line, pos, true);\n 413 | if (!ok) {\n 414 | return;\n 415 | }\n 416 | \n 417 | for (unsigned int ie = 0; ie < nent; ++ie) {\n 418 | if (text.size() < pos + 7) {\n 419 | std::ostringstream errout;\n 420 | errout << \"SGroup SCN line too short: '\" << text << \"' on line \" << line;\n 421 | errout << \"\\n needed: \" << pos + 7 << \" found: \" << text.size();\n 422 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 423 | return;\n 424 | }\n 425 | \n 426 | unsigned int sgIdx =\n 427 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 428 | if (!ok) {\n 429 | return;\n 430 | }\n 431 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 432 | if (!sgroup) {\n 433 | return;\n 434 | }\n 435 | \n 436 | std::string connect = text.substr(++pos, 2);\n 437 | \n 438 | if (!SubstanceGroupChecks::isValidConnectType(connect)) {\n 439 | std::ostringstream errout;\n 440 | errout << \"Unsupported SGroup connection type '\" << connect\n 441 | << \"' on line \" << line;\n 442 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 443 | sgroup->setIsValid(false);\n 444 | return;\n 445 | }\n 446 | \n 447 | sgroup->setProp(\"CONNECT\", connect);\n 448 | pos += 3;\n 449 | }\n 450 | }\n 451 | \n 452 | void ParseSGroupV2000SDSLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 453 | const std::string &text, unsigned int line,\n 454 | bool strictParsing) {\n 455 | PRECONDITION(mol, \"bad mol\");\n 456 | PRECONDITION(text.substr(0, 10) == \"M SDS EXP\", \"bad SDS line\");\n 457 | \n 458 | unsigned int pos = 10;\n 459 | bool ok;\n> 460 | unsigned int nent =\n 461 | ParseSGroupIntField(ok, strictParsing, text, line, pos, true);\n 462 | if (!ok) {\n 463 | return;\n 464 | }\n 465 | \n 466 | for (unsigned int ie = 0; ie < nent; ++ie) {\n 467 | if (text.size() < pos + 4) {\n 468 | std::ostringstream errout;\n 469 | errout << \"SGroup SDS line too short: '\" << text << \"' on line \" << line;\n 470 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 471 | return;\n 472 | }\n 473 | unsigned int sgIdx =\n 474 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 475 | if (!ok) {\n 476 | return;\n 477 | }\n 478 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 479 | if (!sgroup) {\n 480 | return;\n 481 | }\n 482 | \n 483 | sgroup->setProp(\"ESTATE\", \"E\");\n 484 | }\n 485 | }\n 486 | \n 487 | void ParseSGroupV2000SBVLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 488 | const std::string &text, unsigned int line,\n 489 | bool strictParsing) {\n 490 | PRECONDITION(mol, \"bad mol\");\n 491 | PRECONDITION(text.substr(0, 6) == \"M SBV\", \"bad SBV line\");\n 492 | \n 493 | unsigned int pos = 6;\n 494 | bool ok;\n 495 | unsigned int sgIdx = ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 496 | if (!ok) {\n 497 | return;\n 498 | }\n 499 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 500 | if (!sgroup) {\n 501 | return;\n 502 | }\n 503 | \n 504 | unsigned int bondMark =\n 505 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 506 | if (!ok) {\n 507 | sgroup->setIsValid(false);\n 508 | return;\n 509 | }\n 510 | Bond *bond = mol->getUniqueBondWithBookmark(bondMark);\n 511 | \n 512 | RDGeom::Point3D vector;\n 513 | if (sgroup->getProp<std::string>(\"TYPE\") == \"SUP\") {\n 514 | vector.x = ParseSGroupDoubleField(ok, strictParsing, text, line, pos);\n 515 | if (!ok) {\n 516 | sgroup->setIsValid(false);\n 517 | return;\n 518 | }\n 519 | vector.y = ParseSGroupDoubleField(ok, strictParsing, text, line, pos);\n 520 | if (!ok) {\n 521 | sgroup->setIsValid(false);\n 522 | return;\n 523 | }\n 524 | vector.z = 0.;\n 525 | }\n 526 | \n 527 | try {\n 528 | sgroup->addCState(bond->getIdx(), vector);\n 529 | } catch (const std::exception &e) {\n 530 | SGroupWarnOrThrow<>(strictParsing, e.what());\n 531 | sgroup->setIsValid(false);\n 532 | return;\n 533 | }\n 534 | }\n 535 | \n 536 | void ParseSGroupV2000SDTLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 537 | const std::string &text, unsigned int line,\n 538 | bool strictParsing) {\n 539 | PRECONDITION(mol, \"bad mol\");\n 540 | PRECONDITION(text.substr(0, 6) == \"M SDT\", \"bad SDT line\");\n 541 | \n 542 | unsigned int pos = 6;\n 543 | bool ok;\n 544 | unsigned int sgIdx = ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 545 | if (!ok) {\n 546 | return;\n 547 | }\n 548 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 549 | if (!sgroup) {\n 550 | return;\n 551 | }\n 552 | \n 553 | std::string fieldName;\n 554 | std::string fieldType;\n 555 | std::string fieldInfo;\n 556 | std::string queryType;\n 557 | std::string queryOp;\n 558 | \n 559 | try {\n 560 | fieldName = text.substr(++pos, 30);", "src_commits": "[{\"path\":\"/src/eigen\",\"rev\":\"2cf9891537250255f50df5109ffe9e700e2a73de\",\"url\":\"https://gitlab.com/libeigen/eigen\"},{\"path\":\"/src/rdkit\",\"rev\":\"232e4ffc84de1983918e6422fbec47d5da74db25\",\"url\":\"https://github.com/rdkit/rdkit.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 4320, "coverage_keys": "[\"/src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp\"]", "target_text": "Reach line at /src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp:460 (observed count 4320).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-rdkit:v2026-07-test1@sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_digest": "sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
| {"target_id": "rdkit:merged:src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp:463", "coin_version": "v2026-07", "coin_commit": "e99b764ba8d7a546e425666851b81545bc800f63", "oss_fuzz_commit": "d87225267726cf7ce1a3e17cf103c5ac943c4f05", "coverage_date": "20260504", "project": "rdkit", "harness": "merged", "harness_binaries": "[\"mol_data_stream_to_mol_fuzzer\", \"mol_deserialization_fuzzer\", \"smiles_string_to_mol_fuzzer\"]", "language": "c++", "file": "/src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp", "line_start": 463, "line_end": 463, "line_count": 1, "function": "", "source_snippet": " 363 | ParseSGroupIntField(ok, strictParsing, text, line, pos, true);\n 364 | if (!ok) {\n 365 | return;\n 366 | }\n 367 | \n 368 | for (unsigned int ie = 0; ie < nent; ++ie) {\n 369 | if (text.size() < pos + 8) {\n 370 | std::ostringstream errout;\n 371 | errout << \"SGroup SLB line too short: '\" << text << \"' on line \" << line;\n 372 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 373 | return;\n 374 | }\n 375 | \n 376 | unsigned int sgIdx =\n 377 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 378 | if (!ok) {\n 379 | return;\n 380 | }\n 381 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 382 | if (!sgroup) {\n 383 | return;\n 384 | }\n 385 | unsigned int id = ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 386 | if (!ok) {\n 387 | sgroup->setIsValid(false);\n 388 | return;\n 389 | }\n 390 | if (id != 0 && !SubstanceGroupChecks::isSubstanceGroupIdFree(*mol, id)) {\n 391 | std::ostringstream errout;\n 392 | errout << \"SGroup ID '\" << id\n 393 | << \"' is assigned to more than one SGroup, on line \" << line;\n 394 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 395 | sgroup->setIsValid(false);\n 396 | return;\n 397 | }\n 398 | \n 399 | sgroup->setProp<unsigned int>(\"ID\", id);\n 400 | }\n 401 | }\n 402 | \n 403 | void ParseSGroupV2000SCNLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 404 | const std::string &text, unsigned int line,\n 405 | bool strictParsing) {\n 406 | PRECONDITION(mol, \"bad mol\");\n 407 | PRECONDITION(text.substr(0, 6) == \"M SCN\", \"bad SCN line\");\n 408 | \n 409 | unsigned int pos = 6;\n 410 | bool ok;\n 411 | unsigned int nent =\n 412 | ParseSGroupIntField(ok, strictParsing, text, line, pos, true);\n 413 | if (!ok) {\n 414 | return;\n 415 | }\n 416 | \n 417 | for (unsigned int ie = 0; ie < nent; ++ie) {\n 418 | if (text.size() < pos + 7) {\n 419 | std::ostringstream errout;\n 420 | errout << \"SGroup SCN line too short: '\" << text << \"' on line \" << line;\n 421 | errout << \"\\n needed: \" << pos + 7 << \" found: \" << text.size();\n 422 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 423 | return;\n 424 | }\n 425 | \n 426 | unsigned int sgIdx =\n 427 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 428 | if (!ok) {\n 429 | return;\n 430 | }\n 431 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 432 | if (!sgroup) {\n 433 | return;\n 434 | }\n 435 | \n 436 | std::string connect = text.substr(++pos, 2);\n 437 | \n 438 | if (!SubstanceGroupChecks::isValidConnectType(connect)) {\n 439 | std::ostringstream errout;\n 440 | errout << \"Unsupported SGroup connection type '\" << connect\n 441 | << \"' on line \" << line;\n 442 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 443 | sgroup->setIsValid(false);\n 444 | return;\n 445 | }\n 446 | \n 447 | sgroup->setProp(\"CONNECT\", connect);\n 448 | pos += 3;\n 449 | }\n 450 | }\n 451 | \n 452 | void ParseSGroupV2000SDSLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 453 | const std::string &text, unsigned int line,\n 454 | bool strictParsing) {\n 455 | PRECONDITION(mol, \"bad mol\");\n 456 | PRECONDITION(text.substr(0, 10) == \"M SDS EXP\", \"bad SDS line\");\n 457 | \n 458 | unsigned int pos = 10;\n 459 | bool ok;\n 460 | unsigned int nent =\n 461 | ParseSGroupIntField(ok, strictParsing, text, line, pos, true);\n 462 | if (!ok) {\n> 463 | return;\n 464 | }\n 465 | \n 466 | for (unsigned int ie = 0; ie < nent; ++ie) {\n 467 | if (text.size() < pos + 4) {\n 468 | std::ostringstream errout;\n 469 | errout << \"SGroup SDS line too short: '\" << text << \"' on line \" << line;\n 470 | SGroupWarnOrThrow<>(strictParsing, errout.str());\n 471 | return;\n 472 | }\n 473 | unsigned int sgIdx =\n 474 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 475 | if (!ok) {\n 476 | return;\n 477 | }\n 478 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 479 | if (!sgroup) {\n 480 | return;\n 481 | }\n 482 | \n 483 | sgroup->setProp(\"ESTATE\", \"E\");\n 484 | }\n 485 | }\n 486 | \n 487 | void ParseSGroupV2000SBVLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 488 | const std::string &text, unsigned int line,\n 489 | bool strictParsing) {\n 490 | PRECONDITION(mol, \"bad mol\");\n 491 | PRECONDITION(text.substr(0, 6) == \"M SBV\", \"bad SBV line\");\n 492 | \n 493 | unsigned int pos = 6;\n 494 | bool ok;\n 495 | unsigned int sgIdx = ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 496 | if (!ok) {\n 497 | return;\n 498 | }\n 499 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 500 | if (!sgroup) {\n 501 | return;\n 502 | }\n 503 | \n 504 | unsigned int bondMark =\n 505 | ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 506 | if (!ok) {\n 507 | sgroup->setIsValid(false);\n 508 | return;\n 509 | }\n 510 | Bond *bond = mol->getUniqueBondWithBookmark(bondMark);\n 511 | \n 512 | RDGeom::Point3D vector;\n 513 | if (sgroup->getProp<std::string>(\"TYPE\") == \"SUP\") {\n 514 | vector.x = ParseSGroupDoubleField(ok, strictParsing, text, line, pos);\n 515 | if (!ok) {\n 516 | sgroup->setIsValid(false);\n 517 | return;\n 518 | }\n 519 | vector.y = ParseSGroupDoubleField(ok, strictParsing, text, line, pos);\n 520 | if (!ok) {\n 521 | sgroup->setIsValid(false);\n 522 | return;\n 523 | }\n 524 | vector.z = 0.;\n 525 | }\n 526 | \n 527 | try {\n 528 | sgroup->addCState(bond->getIdx(), vector);\n 529 | } catch (const std::exception &e) {\n 530 | SGroupWarnOrThrow<>(strictParsing, e.what());\n 531 | sgroup->setIsValid(false);\n 532 | return;\n 533 | }\n 534 | }\n 535 | \n 536 | void ParseSGroupV2000SDTLine(IDX_TO_SGROUP_MAP &sGroupMap, RWMol *mol,\n 537 | const std::string &text, unsigned int line,\n 538 | bool strictParsing) {\n 539 | PRECONDITION(mol, \"bad mol\");\n 540 | PRECONDITION(text.substr(0, 6) == \"M SDT\", \"bad SDT line\");\n 541 | \n 542 | unsigned int pos = 6;\n 543 | bool ok;\n 544 | unsigned int sgIdx = ParseSGroupIntField(ok, strictParsing, text, line, pos);\n 545 | if (!ok) {\n 546 | return;\n 547 | }\n 548 | SubstanceGroup *sgroup = FindSgIdx(sGroupMap, sgIdx, line);\n 549 | if (!sgroup) {\n 550 | return;\n 551 | }\n 552 | \n 553 | std::string fieldName;\n 554 | std::string fieldType;\n 555 | std::string fieldInfo;\n 556 | std::string queryType;\n 557 | std::string queryOp;\n 558 | \n 559 | try {\n 560 | fieldName = text.substr(++pos, 30);\n 561 | boost::trim_right(fieldName);\n 562 | pos += 30;\n 563 | fieldType = text.substr(pos, 2);", "src_commits": "[{\"path\":\"/src/eigen\",\"rev\":\"2cf9891537250255f50df5109ffe9e700e2a73de\",\"url\":\"https://gitlab.com/libeigen/eigen\"},{\"path\":\"/src/rdkit\",\"rev\":\"232e4ffc84de1983918e6422fbec47d5da74db25\",\"url\":\"https://github.com/rdkit/rdkit.git\"}]", "gcs_covered": true, "baseline_reachable": "[]", "agent_baseline_reachable": "[]", "codeql_reachable": "[]", "cnt": 348, "coverage_keys": "[\"/src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp\"]", "target_text": "Reach line at /src/rdkit/Code/GraphMol/FileParsers/MolSGroupParsing.cpp:463 (observed count 348).", "prompt_preview": "", "runtime_image": "localhost:5000/cointest/runtime-rdkit:v2026-07-test1@sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_digest": "sha256:3361dd349cc9e92dfe48e664b1c0fe61eeadf62cc08834e8f9ae28187f283320", "runtime_normal_path": "/out/normal", "runtime_coverage_path": "/out/coverage", "runtime_source_path": "/src", "oss_fuzz_runner_image": "gcr.io/oss-fuzz-base/base-runner", "coverage_extra_args": "", "split": "gcs_reachable"} |
|
|