static_analyzer
stringclasses
2 values
cve_id
stringlengths
13
16
dataset
stringclasses
5 values
environment_id
stringlengths
16
67
group
stringclasses
5 values
language
stringclasses
5 values
project_id
stringlengths
9
54
task_id
stringlengths
9
30
task_path
stringlengths
22
73
task_prompt
stringlengths
4.92k
22.9k
patch
stringlengths
318
241k
before_context
stringlengths
220
2.06M
after_context
stringlengths
113
2.08M
task_metadata_json
stringlengths
765
8.94k
checker_template
stringclasses
1 value
codeql
CVE-2020-19001
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-3187445bcbbf39128a26
CodeQL python
python
pyvul__tankywoo__simiki
pyvul-3187445bcbbf39128a26
codeql_python_benchmark51_v2/tasks/pyvul-3187445bcbbf39128a26
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/requirements.txt b/requirements.txt index 7d2f3f5..9d73a97 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ Markdown==2.6.8 Pygments==1.6 Jinja2==2.7.3 -PyYAML==3.11 +PyYAML==5.1 docopt==0.6.1 ordereddict==1.1 watchdog==0.8.3 diff --git a/simiki/config.py b/simiki/config.py index ...
# Patch-overlapping Python context before the fix ## `simiki/config.py` — `function:parse_config` (lines 57-69) ```python def parse_config(config_file): if not os.path.exists(config_file): raise ConfigFileNotFound("{0} not exists".format(config_file)) default_config = _set_default_config() with ...
# Patch-overlapping Python context after the fix ## `simiki/config.py` — `function:parse_config` (lines 57-69) ```python def parse_config(config_file): if not os.path.exists(config_file): raise ConfigFileNotFound("{0} not exists".format(config_file)) default_config = _set_default_config() with i...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-3187445bcbbf39128a26", "dataset_id": "PyVul", "dataset_item_id": "pyvul-3187445bcbbf39128a26", "project_id": "pyvul__tankywoo__simiki", "language": "python", "backend": "codeql" }, "changed_python_files": [ "simiki/...
null
codeql
CVE-2022-0845
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-36a40541d7c74a9a7777
CodeQL python
python
pyvul__pytorchlightning__pytorch-lightning
pyvul-36a40541d7c74a9a7777
codeql_python_benchmark51_v2/tasks/pyvul-36a40541d7c74a9a7777
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 225fced44..7bfe08edb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -663,9 +663,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed an issue where `HorovodStrategy.teardown()` did not complete gracefully if an exception was thr...
# Patch-overlapping Python context before the fix ## `pytorch_lightning/utilities/argparse.py` — `function:parse_env_variables` (lines 99-126) ```python def parse_env_variables(cls: Type["pl.Trainer"], template: str = "PL_%(cls_name)s_%(cls_argument)s") -> Namespace: """Parse environment arguments if they are def...
# Patch-overlapping Python context after the fix ## `pytorch_lightning/utilities/argparse.py` — `function:parse_env_variables` (lines 100-127) ```python def parse_env_variables(cls: Type["pl.Trainer"], template: str = "PL_%(cls_name)s_%(cls_argument)s") -> Namespace: """Parse environment arguments if they are def...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-36a40541d7c74a9a7777", "dataset_id": "PyVul", "dataset_item_id": "pyvul-36a40541d7c74a9a7777", "project_id": "pyvul__pytorchlightning__pytorch-lightning", "language": "python", "backend": "codeql" }, "changed_python_fil...
null
codeql
CVE-2023-6395
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-3819b1a7530257524a75
CodeQL python
python
pyvul__xsuchy__templated-dictionary
pyvul-3819b1a7530257524a75
codeql_python_benchmark51_v2/tasks/pyvul-3819b1a7530257524a75
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/templated_dictionary/__init__.py b/templated_dictionary/__init__.py index 994166a..ec004c0 100644 --- a/templated_dictionary/__init__.py +++ b/templated_dictionary/__init__.py @@ -2,7 +2,7 @@ # vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0: from collections.abc import Muta...
# Patch-overlapping Python context before the fix ## `templated_dictionary/__init__.py` — `class:TemplatedDictionary` (lines 9-88) ```python class TemplatedDictionary(MutableMapping): """ Dictionary where __getitem__() is run through Jinja2 template """ def __init__(self, *args, alias_spec=None, **kwargs): ...
# Patch-overlapping Python context after the fix ## `templated_dictionary/__init__.py` — `class:TemplatedDictionary` (lines 9-89) ```python class TemplatedDictionary(MutableMapping): """ Dictionary where __getitem__() is run through Jinja2 template """ def __init__(self, *args, alias_spec=None, **kwargs): ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-3819b1a7530257524a75", "dataset_id": "PyVul", "dataset_item_id": "pyvul-3819b1a7530257524a75", "project_id": "pyvul__xsuchy__templated-dictionary", "language": "python", "backend": "codeql" }, "changed_python_files": [ ...
null
codeql
CVE-2020-29128
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-394adf7b067d96b356ca
CodeQL python
python
pyvul__petl-developers__petl
pyvul-394adf7b067d96b356ca
codeql_python_benchmark51_v2/tasks/pyvul-394adf7b067d96b356ca
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/petl/io/xml.py b/petl/io/xml.py index 983d9f6..b63287c 100644 --- a/petl/io/xml.py +++ b/petl/io/xml.py @@ -133,6 +133,9 @@ def fromxml(source, *args, **kwargs): or list of paths can be provided, e.g., ``fromxml('example.html', './/tr', ('th', 'td'))``. + Optionally a custom parser can be pr...
# Patch-overlapping Python context before the fix ## `petl/io/xml.py` — `function:fromxml` (lines 22-139) ```python def fromxml(source, *args, **kwargs): """ Extract data from an XML file. E.g.:: >>> import petl as etl >>> # setup a file to demonstrate with ... d = '''<table> ...
# Patch-overlapping Python context after the fix ## `petl/io/xml.py` — `function:fromxml` (lines 22-142) ```python def fromxml(source, *args, **kwargs): """ Extract data from an XML file. E.g.:: >>> import petl as etl >>> # setup a file to demonstrate with ... d = '''<table> ....
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-394adf7b067d96b356ca", "dataset_id": "PyVul", "dataset_item_id": "pyvul-394adf7b067d96b356ca", "project_id": "pyvul__petl-developers__petl", "language": "python", "backend": "codeql" }, "changed_python_files": [ "pe...
null
codeql
CVE-2021-41127
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-3994e3622b21c396ef8a
CodeQL python
python
pyvul__rasahq__rasa
pyvul-3994e3622b21c396ef8a
codeql_python_benchmark51_v2/tasks/pyvul-3994e3622b21c396ef8a
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/poetry.lock b/poetry.lock index a7197f5f28b..78b0adedf13 100644 --- a/poetry.lock +++ b/poetry.lock @@ -242,14 +242,14 @@ numpy = ">=1.15.0" [[package]] name = "boto3" -version = "1.18.52" +version = "1.18.58" description = "The AWS SDK for Python" category = "main" optional = false python-versions...
# Patch-overlapping Python context before the fix ## `rasa/model.py` — `function:unpack_model` (lines 210-238) ```python def unpack_model( model_file: Text, working_directory: Optional[Union[Path, Text]] = None ) -> TempDirectoryPath: """Unpack a zipped Rasa model. Args: model_file: Path to zippe...
# Patch-overlapping Python context after the fix ## `rasa/model.py` — `function:unpack_model` (lines 210-239) ```python def unpack_model( model_file: Text, working_directory: Optional[Union[Path, Text]] = None ) -> TempDirectoryPath: """Unpack a zipped Rasa model. Args: model_file: Path to zipped...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-3994e3622b21c396ef8a", "dataset_id": "PyVul", "dataset_item_id": "pyvul-3994e3622b21c396ef8a", "project_id": "pyvul__rasahq__rasa", "language": "python", "backend": "codeql" }, "changed_python_files": [ "rasa/model....
null
codeql
CVE-2014-1932
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-4954e5890cce23c8b03d
CodeQL python
python
pyvul__python-imaging__pillow
pyvul-4954e5890cce23c8b03d
codeql_python_benchmark51_v2/tasks/pyvul-4954e5890cce23c8b03d
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index a8706b05f..fcfae8a81 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -67,7 +67,8 @@ def Ghostscript(tile, size, fp, scale=1): import tempfile, os, subprocess - file = tempfile.mktemp() + out_fd, file = tempfile.mkstemp() +...
# Patch-overlapping Python context before the fix ## `PIL/EpsImagePlugin.py` — `function:Ghostscript` (lines 53-109) ```python def Ghostscript(tile, size, fp, scale=1): """Render an image using Ghostscript""" # Unpack decoder tile decoder, tile, offset, data = tile[0] length, bbox = data #Hack t...
# Patch-overlapping Python context after the fix ## `PIL/EpsImagePlugin.py` — `function:Ghostscript` (lines 53-110) ```python def Ghostscript(tile, size, fp, scale=1): """Render an image using Ghostscript""" # Unpack decoder tile decoder, tile, offset, data = tile[0] length, bbox = data #Hack to...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-4954e5890cce23c8b03d", "dataset_id": "PyVul", "dataset_item_id": "pyvul-4954e5890cce23c8b03d", "project_id": "pyvul__python-imaging__pillow", "language": "python", "backend": "codeql" }, "changed_python_files": [ "P...
null
codeql
CVE-2023-48700
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-4ac3440b9023e6511a91
CodeQL python
python
pyvul__nautobot__nautobot-plugin-device-onboarding
pyvul-4ac3440b9023e6511a91
codeql_python_benchmark51_v2/tasks/pyvul-4ac3440b9023e6511a91
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/nautobot_device_onboarding/jobs.py b/nautobot_device_onboarding/jobs.py index cca9e9c..72b843d 100644 --- a/nautobot_device_onboarding/jobs.py +++ b/nautobot_device_onboarding/jobs.py @@ -13,12 +13,7 @@ PLUGIN_SETTINGS = settings.PLUGINS_CONFIG["nautobot_device_onboarding"] class OnboardingTask(Job): ...
# Patch-overlapping Python context before the fix ## `nautobot_device_onboarding/jobs.py` — `class:OnboardingTask` (lines 15-86) ```python class OnboardingTask(Job): class Meta: """Meta object boilerplate for onboarding.""" name = "Perform Device Onboarding" description = "Login to a devi...
# Patch-overlapping Python context after the fix ## `nautobot_device_onboarding/jobs.py` — `class:OnboardingTask` (lines 15-93) ```python class OnboardingTask(Job): """Nautobot Job for onboarding a new device.""" location = ObjectVar(model=Location, query_params={"": ""}, required=False, description="") ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-4ac3440b9023e6511a91", "dataset_id": "PyVul", "dataset_item_id": "pyvul-4ac3440b9023e6511a91", "project_id": "pyvul__nautobot__nautobot-plugin-device-onboarding", "language": "python", "backend": "codeql" }, "changed_py...
null
codeql
CVE-2021-4315
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-4e31b8fba29687b8d792
CodeQL python
python
pyvul__nyuccl__psiturk
pyvul-4e31b8fba29687b8d792
codeql_python_benchmark51_v2/tasks/pyvul-4e31b8fba29687b8d792
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/psiturk/experiment.py b/psiturk/experiment.py index a6904f6..7ba1c1e 100644 --- a/psiturk/experiment.py +++ b/psiturk/experiment.py @@ -380,9 +380,10 @@ def advertisement(): # even have accepted the HIT. with open('templates/ad.html', 'r') as temp_file: ad_string = temp_file....
# Patch-overlapping Python context before the fix ## `psiturk/experiment.py` — `function:advertisement` (lines 284-391) ```python def advertisement(): """ This is the url we give for the ad for our 'external question'. The ad has to display two different things: This page will be called from within m...
# Patch-overlapping Python context after the fix ## `psiturk/experiment.py` — `function:advertisement` (lines 284-392) ```python def advertisement(): """ This is the url we give for the ad for our 'external question'. The ad has to display two different things: This page will be called from within me...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-4e31b8fba29687b8d792", "dataset_id": "PyVul", "dataset_item_id": "pyvul-4e31b8fba29687b8d792", "project_id": "pyvul__nyuccl__psiturk", "language": "python", "backend": "codeql" }, "changed_python_files": [ "psiturk/...
null
codeql
CVE-2021-32839
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-509b1de3e2277ac89469
CodeQL python
python
pyvul__andialbrecht__sqlparse
pyvul-509b1de3e2277ac89469
codeql_python_benchmark51_v2/tasks/pyvul-509b1de3e2277ac89469
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/sqlparse/filters/others.py b/sqlparse/filters/others.py index e0e1ca1..6905f2d 100644 --- a/sqlparse/filters/others.py +++ b/sqlparse/filters/others.py @@ -22,7 +22,10 @@ class StripCommentsFilter: def _get_insert_token(token): """Returns either a whitespace or the line breaks from to...
# Patch-overlapping Python context before the fix ## `sqlparse/filters/others.py` — `class:StripCommentsFilter` (lines 14-53) ```python class StripCommentsFilter: @staticmethod def _process(tlist): def get_next_comment(): # TODO(andi) Comment types should be unified, see related issue38 ...
# Patch-overlapping Python context after the fix ## `sqlparse/filters/others.py` — `class:StripCommentsFilter` (lines 14-56) ```python class StripCommentsFilter: @staticmethod def _process(tlist): def get_next_comment(): # TODO(andi) Comment types should be unified, see related issue38 ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-509b1de3e2277ac89469", "dataset_id": "PyVul", "dataset_item_id": "pyvul-509b1de3e2277ac89469", "project_id": "pyvul__andialbrecht__sqlparse", "language": "python", "backend": "codeql" }, "changed_python_files": [ "s...
null
codeql
CVE-2022-23530
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-533cc1a8c090c7529184
CodeQL python
python
pyvul__datadog__guarddog
pyvul-533cc1a8c090c7529184
codeql_python_benchmark51_v2/tasks/pyvul-533cc1a8c090c7529184
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/.github/semgrep-rules/insecure-unpack-archive.yml b/.github/semgrep-rules/insecure-unpack-archive.yml new file mode 100644 index 0000000..d40f645 --- /dev/null +++ b/.github/semgrep-rules/insecure-unpack-archive.yml @@ -0,0 +1,21 @@ +rules: + - id: insecure-shutil-unpack-archive-use + message: The Pyth...
# Patch-overlapping Python context before the fix ## `guarddog/scanners/package_scanner.py` — `class:PackageScanner` (lines 13-164) ```python class PackageScanner(Scanner): """ Scans package for attack vectors based on source code and metadata rules Attributes: analyzer (Analyzer): Analyzer for s...
# Patch-overlapping Python context after the fix ## `guarddog/scanners/package_scanner.py` — `class:PackageScanner` (lines 12-166) ```python class PackageScanner(Scanner): """ Scans package for attack vectors based on source code and metadata rules Attributes: analyzer (Analyzer): Analyzer for so...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-533cc1a8c090c7529184", "dataset_id": "PyVul", "dataset_item_id": "pyvul-533cc1a8c090c7529184", "project_id": "pyvul__datadog__guarddog", "language": "python", "backend": "codeql" }, "changed_python_files": [ "guardd...
null
codeql
CVE-2023-34540
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-5cffd45f7550a060e2cf
CodeQL python
python
pyvul__langchain-ai__langchain
pyvul-5cffd45f7550a060e2cf
codeql_python_benchmark51_v2/tasks/pyvul-5cffd45f7550a060e2cf
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/langchain/tools/jira/prompt.py b/langchain/tools/jira/prompt.py index a50c373c9a..08f0602304 100644 --- a/langchain/tools/jira/prompt.py +++ b/langchain/tools/jira/prompt.py @@ -25,11 +25,12 @@ JIRA_CATCH_ALL_PROMPT = """ This tool is a wrapper around atlassian-python-api's Jira API. There are ot...
# Patch-overlapping Python context before the fix ## `langchain/tools/jira/prompt.py` — `module:<module>@24` (lines 24-34) ```python JIRA_CATCH_ALL_PROMPT = """ This tool is a wrapper around atlassian-python-api's Jira API. There are other dedicated tools for fetching all projects, and creating and searching ...
# Patch-overlapping Python context after the fix ## `langchain/tools/jira/prompt.py` — `module:<module>@24` (lines 24-35) ```python JIRA_CATCH_ALL_PROMPT = """ This tool is a wrapper around atlassian-python-api's Jira API. There are other dedicated tools for fetching all projects, and creating and searching f...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-5cffd45f7550a060e2cf", "dataset_id": "PyVul", "dataset_item_id": "pyvul-5cffd45f7550a060e2cf", "project_id": "pyvul__langchain-ai__langchain", "language": "python", "backend": "codeql" }, "changed_python_files": [ "...
null
codeql
CVE-2022-0315
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-6b5cf1b92b87b04c09cd
CodeQL python
python
pyvul__horovod__horovod
pyvul-6b5cf1b92b87b04c09cd
codeql_python_benchmark51_v2/tasks/pyvul-6b5cf1b92b87b04c09cd
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/horovod/runner/js_run.py b/horovod/runner/js_run.py index d25f5dd3..5be68011 100644 --- a/horovod/runner/js_run.py +++ b/horovod/runner/js_run.py @@ -126,7 +126,12 @@ def generate_jsrun_rankfile(settings, path=None): slots=settings.num_proc)) # Generate rankfile - path = tempfile.mkt...
# Patch-overlapping Python context before the fix ## `horovod/runner/js_run.py` — `function:generate_jsrun_rankfile` (lines 96-146) ```python def generate_jsrun_rankfile(settings, path=None): """ Generates rankfile to use with jsrun. It splits the cores among the processes, which leads to best performance...
# Patch-overlapping Python context after the fix ## `horovod/runner/js_run.py` — `function:generate_jsrun_rankfile` (lines 96-151) ```python def generate_jsrun_rankfile(settings, path=None): """ Generates rankfile to use with jsrun. It splits the cores among the processes, which leads to best performance ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-6b5cf1b92b87b04c09cd", "dataset_id": "PyVul", "dataset_item_id": "pyvul-6b5cf1b92b87b04c09cd", "project_id": "pyvul__horovod__horovod", "language": "python", "backend": "codeql" }, "changed_python_files": [ "horovod...
null
codeql
CVE-2021-23393
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-796a152aa965ce44a6db
CodeQL python
python
pyvul__briancappello__flask-unchained
pyvul-796a152aa965ce44a6db
codeql_python_benchmark51_v2/tasks/pyvul-796a152aa965ce44a6db
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/flask_unchained/bundles/controller/utils.py b/flask_unchained/bundles/controller/utils.py index ae9a2db..c9946d9 100644 --- a/flask_unchained/bundles/controller/utils.py +++ b/flask_unchained/bundles/controller/utils.py @@ -6,7 +6,7 @@ from flask_unchained.string_utils import kebab_case, right_replace, sna...
# Patch-overlapping Python context before the fix ## `flask_unchained/bundles/controller/utils.py` — `function:redirect` (lines 187-239) ```python def redirect(where: Optional[str] = None, default: Optional[str] = None, override: Optional[str] = None, _anchor: Optional[str] = No...
# Patch-overlapping Python context after the fix ## `flask_unchained/bundles/controller/utils.py` — `function:encode_non_url_reserved_characters` (lines 186-188) ```python def encode_non_url_reserved_characters(url): # safe url reserved characters: https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 ret...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-796a152aa965ce44a6db", "dataset_id": "PyVul", "dataset_item_id": "pyvul-796a152aa965ce44a6db", "project_id": "pyvul__briancappello__flask-unchained", "language": "python", "backend": "codeql" }, "changed_python_files": ...
null
codeql
CVE-2021-21274
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-7c3c693e688548564c9a
CodeQL python
python
pyvul__matrix-org__synapse
pyvul-7c3c693e688548564c9a
codeql_python_benchmark51_v2/tasks/pyvul-7c3c693e688548564c9a
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/changelog.d/8950.misc b/changelog.d/8950.misc new file mode 100644 index 000000000..42e0335af --- /dev/null +++ b/changelog.d/8950.misc @@ -0,0 +1 @@ +Add a maximum size of 50 kilobytes to .well-known lookups. diff --git a/synapse/http/client.py b/synapse/http/client.py index df7730078..29f40ddf5 100644 --...
# Patch-overlapping Python context before the fix ## `synapse/http/client.py` — `class:SimpleHttpClient` (lines 280-736) ```python class SimpleHttpClient: """ A simple, no-frills HTTP client with methods that wrap up common ways of using HTTP in Matrix """ def __init__( self, hs: ...
# Patch-overlapping Python context after the fix ## `synapse/http/client.py` — `class:SimpleHttpClient` (lines 280-739) ```python class SimpleHttpClient: """ A simple, no-frills HTTP client with methods that wrap up common ways of using HTTP in Matrix """ def __init__( self, hs: "...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-7c3c693e688548564c9a", "dataset_id": "PyVul", "dataset_item_id": "pyvul-7c3c693e688548564c9a", "project_id": "pyvul__matrix-org__synapse", "language": "python", "backend": "codeql" }, "changed_python_files": [ "syna...
null
codeql
CVE-2017-16616
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-7c7eaf17f0df49603ae4
CodeQL python
python
pyvul__stranger6667__pyanyapi
pyvul-7c7eaf17f0df49603ae4
codeql_python_benchmark51_v2/tasks/pyvul-7c7eaf17f0df49603ae4
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/.travis.yml b/.travis.yml index 1975b26..b7b5b14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,30 @@ language: python python: - 3.5 -env: - - TOX_ENV=py26 - - TOX_ENV=py27 - - TOX_ENV=py32 - - TOX_ENV=py33 - - TOX_ENV=py34 - - TOX_ENV=py35 - - TOX_ENV=pypy - - TOX_ENV=pypy3 - - JYTHO...
# Patch-overlapping Python context before the fix ## `pyanyapi/interfaces.py` — `class:YAMLInterface` (lines 272-279) ```python class YAMLInterface(DictInterface): _error_message = 'YAML data can not be parsed.' def perform_parsing(self): try: return yaml.load(self.content) except...
# Patch-overlapping Python context after the fix ## `pyanyapi/interfaces.py` — `class:YAMLInterface` (lines 272-279) ```python class YAMLInterface(DictInterface): _error_message = 'YAML data can not be parsed.' def perform_parsing(self): try: return yaml.safe_load(self.content) ex...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-7c7eaf17f0df49603ae4", "dataset_id": "PyVul", "dataset_item_id": "pyvul-7c7eaf17f0df49603ae4", "project_id": "pyvul__stranger6667__pyanyapi", "language": "python", "backend": "codeql" }, "changed_python_files": [ "p...
null
codeql
CVE-2018-25082
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-810ace2bf3e4aa0f04a1
CodeQL python
python
pyvul__zwczou__weixin-python
pyvul-810ace2bf3e4aa0f04a1
codeql_python_benchmark51_v2/tasks/pyvul-810ace2bf3e4aa0f04a1
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/weixin/msg.py b/weixin/msg.py index cb4e74a..89806b0 100644 --- a/weixin/msg.py +++ b/weixin/msg.py @@ -64,7 +64,8 @@ class WeixinMsg(object): def parse(self, content): raw = {} - root = etree.fromstring(content) + root = etree.fromstring(content, + ...
# Patch-overlapping Python context before the fix ## `weixin/msg.py` — `class:WeixinMsg` (lines 40-336) ```python class WeixinMsg(object): def __init__(self, token, sender=None, expires_in=0): self.token = token self.sender = sender self.expires_in = expires_in self._registry = di...
# Patch-overlapping Python context after the fix ## `weixin/msg.py` — `class:WeixinMsg` (lines 40-337) ```python class WeixinMsg(object): def __init__(self, token, sender=None, expires_in=0): self.token = token self.sender = sender self.expires_in = expires_in self._registry = dic...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-810ace2bf3e4aa0f04a1", "dataset_id": "PyVul", "dataset_item_id": "pyvul-810ace2bf3e4aa0f04a1", "project_id": "pyvul__zwczou__weixin-python", "language": "python", "backend": "codeql" }, "changed_python_files": [ "we...
null
codeql
CVE-2022-31605
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-812f35b535c5e549929b
CodeQL python
python
pyvul__nvidia__nvflare
pyvul-812f35b535c5e549929b
codeql_python_benchmark51_v2/tasks/pyvul-812f35b535c5e549929b
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/nvflare/lighter/provision.py b/nvflare/lighter/provision.py index a00009039..34a420a2b 100644 --- a/nvflare/lighter/provision.py +++ b/nvflare/lighter/provision.py @@ -21,10 +21,9 @@ import shutil import sys import webbrowser -import yaml - from nvflare.fuel.utils.class_utils import instantiate_class ...
# Patch-overlapping Python context before the fix ## `nvflare/lighter/provision.py` — `function:main` (lines 30-100) ```python def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--project_file", type=str, default="project.yml", help="file to describe FL project") parser.add_argument...
# Patch-overlapping Python context after the fix ## `nvflare/lighter/provision.py` — `function:main` (lines 29-99) ```python def main(): parser = argparse.ArgumentParser() parser.add_argument("-p", "--project_file", type=str, default="project.yml", help="file to describe FL project") parser.add_argument("...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-812f35b535c5e549929b", "dataset_id": "PyVul", "dataset_item_id": "pyvul-812f35b535c5e549929b", "project_id": "pyvul__nvidia__nvflare", "language": "python", "backend": "codeql" }, "changed_python_files": [ "nvflare/...
null
codeql
CVE-2013-4260
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-8297e406660c92268ba5
CodeQL python
python
pyvul__ansible__ansible
pyvul-8297e406660c92268ba5
codeql_python_benchmark51_v2/tasks/pyvul-8297e406660c92268ba5
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 8b69d19a0e..712cce7428 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -447,13 +447,7 @@ class PlayBook(object): basedir = self.inventory.basedir() filename = "%s.retry" % os....
# Patch-overlapping Python context before the fix ## `lib/ansible/playbook/__init__.py` — `class:PlayBook` (lines 34-563) ```python class PlayBook(object): ''' runs an ansible playbook, given as a datastructure or YAML filename. A playbook is a deployment, config management, or automation based set of...
# Patch-overlapping Python context after the fix ## `lib/ansible/playbook/__init__.py` — `class:PlayBook` (lines 34-557) ```python class PlayBook(object): ''' runs an ansible playbook, given as a datastructure or YAML filename. A playbook is a deployment, config management, or automation based set of ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-8297e406660c92268ba5", "dataset_id": "PyVul", "dataset_item_id": "pyvul-8297e406660c92268ba5", "project_id": "pyvul__ansible__ansible", "language": "python", "backend": "codeql" }, "changed_python_files": [ "lib/ans...
null
codeql
CVE-2022-36082
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-89a9ff0f9cf4f2f4cc91
CodeQL python
python
pyvul__mansuf__mangadex-downloader
pyvul-89a9ff0f9cf4f2f4cc91
codeql_python_benchmark51_v2/tasks/pyvul-89a9ff0f9cf4f2f4cc91
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/mangadex_downloader/cli/validator.py b/mangadex_downloader/cli/validator.py index dd3f636..deb4f81 100644 --- a/mangadex_downloader/cli/validator.py +++ b/mangadex_downloader/cli/validator.py @@ -31,15 +31,16 @@ def _validate(url): raise argparse.ArgumentTypeError(str(e)) return _url -def v...
# Patch-overlapping Python context before the fix ## `mangadex_downloader/cli/validator.py` — `function:validate_url` (lines 34-48) ```python def validate_url(url): if os.path.exists(url): with open(url, 'r') as opener: content = opener.read() else: content = url urls = [] ...
# Patch-overlapping Python context after the fix ## `mangadex_downloader/cli/validator.py` — `function:_try_read` (lines 34-39) ```python def _try_read(path): if not os.path.exists(path): return None with open(path, 'r') as o: return o.read() ``` ## `mangadex_downloader/cli/validator.py`...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-89a9ff0f9cf4f2f4cc91", "dataset_id": "PyVul", "dataset_item_id": "pyvul-89a9ff0f9cf4f2f4cc91", "project_id": "pyvul__mansuf__mangadex-downloader", "language": "python", "backend": "codeql" }, "changed_python_files": [ ...
null
codeql
CVE-2020-15239
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-8e39d07d2ff863a3f19e
CodeQL python
python
pyvul__horazont__xmpp-http-upload
pyvul-8e39d07d2ff863a3f19e
codeql_python_benchmark51_v2/tasks/pyvul-8e39d07d2ff863a3f19e
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/xhu.py b/xhu.py index a28c5a8..b999957 100644 --- a/xhu.py +++ b/xhu.py @@ -29,6 +29,7 @@ import pathlib import typing import flask +import werkzeug.exceptions app = flask.Flask("xmpp-http-upload") app.config.from_envvar("XMPP_HTTP_UPLOAD_CONFIG") @@ -39,16 +40,11 @@ if app.config['ENABLE_CORS']: ...
# Patch-overlapping Python context before the fix ## `xhu.py` — `function:sanitized_join` (lines 42-46) ```python def sanitized_join(path: str, root: pathlib.Path) -> pathlib.Path: result = (root / path).absolute() if not str(result).startswith(str(root) + "/"): raise ValueError("resulting path is out...
# Patch-overlapping Python context after the fix ## `xhu.py` — `function:get_paths` (lines 43-49) ```python def get_paths(root: str, sub_path: str) \ -> typing.Tuple[pathlib.Path, pathlib.Path]: base_path = flask.safe_join(root, sub_path) data_file = pathlib.Path(base_path + ".data") metadata_file...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-8e39d07d2ff863a3f19e", "dataset_id": "PyVul", "dataset_item_id": "pyvul-8e39d07d2ff863a3f19e", "project_id": "pyvul__horazont__xmpp-http-upload", "language": "python", "backend": "codeql" }, "changed_python_files": [ ...
null
codeql
CVE-2023-29159
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-8f3613497f18d5cf2684
CodeQL python
python
pyvul__encode__starlette
pyvul-8f3613497f18d5cf2684
codeql_python_benchmark51_v2/tasks/pyvul-8f3613497f18d5cf2684
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/starlette/staticfiles.py b/starlette/staticfiles.py index 4d075b3..4c85606 100644 --- a/starlette/staticfiles.py +++ b/starlette/staticfiles.py @@ -169,7 +169,7 @@ class StaticFiles: else: full_path = os.path.realpath(joined_path) directory = os.path.realpath(dire...
# Patch-overlapping Python context before the fix ## `starlette/staticfiles.py` — `class:StaticFiles` (lines 38-246) ```python class StaticFiles: def __init__( self, *, directory: typing.Optional[PathLike] = None, packages: typing.Optional[ typing.List[typing.Union[str,...
# Patch-overlapping Python context after the fix ## `starlette/staticfiles.py` — `class:StaticFiles` (lines 38-246) ```python class StaticFiles: def __init__( self, *, directory: typing.Optional[PathLike] = None, packages: typing.Optional[ typing.List[typing.Union[str, ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-8f3613497f18d5cf2684", "dataset_id": "PyVul", "dataset_item_id": "pyvul-8f3613497f18d5cf2684", "project_id": "pyvul__encode__starlette", "language": "python", "backend": "codeql" }, "changed_python_files": [ "starle...
null
codeql
CVE-2019-11340
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-98fc634e79976d5b5241
CodeQL python
python
pyvul__matrix-org__sydent
pyvul-98fc634e79976d5b5241
codeql_python_benchmark51_v2/tasks/pyvul-98fc634e79976d5b5241
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/sydent/util/emailutils.py b/sydent/util/emailutils.py index 2ae5fdc..7b3b92c 100644 --- a/sydent/util/emailutils.py +++ b/sydent/util/emailutils.py @@ -55,12 +55,13 @@ def sendEmail(sydent, templateName, mailTo, substitutions): allSubstitutions[k+"_forhtml"] = cgi.escape(v.decode('utf8')) ...
# Patch-overlapping Python context before the fix ## `sydent/util/emailutils.py` — `function:sendEmail` (lines 34-86) ```python def sendEmail(sydent, templateName, mailTo, substitutions): mailFrom = sydent.cfg.get('email', 'email.from') mailTemplateFile = sydent.cfg.get('email', templateName) ...
# Patch-overlapping Python context after the fix ## `sydent/util/emailutils.py` — `function:sendEmail` (lines 34-92) ```python def sendEmail(sydent, templateName, mailTo, substitutions): mailFrom = sydent.cfg.get('email', 'email.from') mailTemplateFile = sydent.cfg.get('email', templateName) ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-98fc634e79976d5b5241", "dataset_id": "PyVul", "dataset_item_id": "pyvul-98fc634e79976d5b5241", "project_id": "pyvul__matrix-org__sydent", "language": "python", "backend": "codeql" }, "changed_python_files": [ "syden...
null
codeql
CVE-2019-14806
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-9ba7c665889bf20611cb
CodeQL python
python
pyvul__pallets__werkzeug
pyvul-9ba7c665889bf20611cb
codeql_python_benchmark51_v2/tasks/pyvul-9ba7c665889bf20611cb
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/CHANGES.rst b/CHANGES.rst index 87033da6..70dbab9d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,8 @@ Unreleased (:issue:`1510`) - The debugger detects cycles in chained exceptions and does not time out in that case. (:issue:`1536`) +- When running the development server in Docker,...
# Patch-overlapping Python context before the fix ## `src/werkzeug/debug/__init__.py` — `function:get_machine_id` (lines 63-122) ```python def get_machine_id(): global _machine_id rv = _machine_id if rv is not None: return rv def _generate(): # Potential sources of secret information ...
# Patch-overlapping Python context after the fix ## `src/werkzeug/debug/__init__.py` — `function:get_machine_id` (lines 63-135) ```python def get_machine_id(): global _machine_id rv = _machine_id if rv is not None: return rv def _generate(): # docker containers share the same machine ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-9ba7c665889bf20611cb", "dataset_id": "PyVul", "dataset_item_id": "pyvul-9ba7c665889bf20611cb", "project_id": "pyvul__pallets__werkzeug", "language": "python", "backend": "codeql" }, "changed_python_files": [ "src/we...
null
codeql
CVE-2023-49277
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-9c089aba2c203455d420
CodeQL python
python
pyvul__darrenofficial__dpaste
pyvul-9c089aba2c203455d420
codeql_python_benchmark51_v2/tasks/pyvul-9c089aba2c203455d420
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/dpaste/views.py b/dpaste/views.py index 2e5fdff..123c12d 100644 --- a/dpaste/views.py +++ b/dpaste/views.py @@ -13,6 +13,7 @@ from django.http import ( from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.utils import timezone +from django.utils.html import ...
# Patch-overlapping Python context before the fix ## `dpaste/views.py` — `class:APIView` (lines 239-333) ```python class APIView(View): """ API View """ def _format_default(self, s): """ The default response is the snippet URL wrapped in quotes. """ base_url = config.g...
# Patch-overlapping Python context after the fix ## `dpaste/views.py` — `class:APIView` (lines 240-331) ```python class APIView(View): """ API View """ def _format_default(self, s): """ The default response is the snippet URL wrapped in quotes. """ base_url = config.ge...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-9c089aba2c203455d420", "dataset_id": "PyVul", "dataset_item_id": "pyvul-9c089aba2c203455d420", "project_id": "pyvul__darrenofficial__dpaste", "language": "python", "backend": "codeql" }, "changed_python_files": [ "d...
null
codeql
CVE-2020-15120
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-9dcb85347ac437354c6f
CodeQL python
python
pyvul__spiral-project__ihatemoney
pyvul-9dcb85347ac437354c6f
codeql_python_benchmark51_v2/tasks/pyvul-9dcb85347ac437354c6f
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/ihatemoney/models.py b/ihatemoney/models.py index fe7b519..5691c75 100644 --- a/ihatemoney/models.py +++ b/ihatemoney/models.py @@ -380,7 +380,7 @@ class Person(db.Model): def get_by_name(self, name, project): return ( Person.query.filter(Person.name == name) - ...
# Patch-overlapping Python context before the fix ## `ihatemoney/models.py` — `class:Person` (lines 378-433) ```python class Person(db.Model): class PersonQuery(BaseQuery): def get_by_name(self, name, project): return ( Person.query.filter(Person.name == name) ....
# Patch-overlapping Python context after the fix ## `ihatemoney/models.py` — `class:Person` (lines 378-433) ```python class Person(db.Model): class PersonQuery(BaseQuery): def get_by_name(self, name, project): return ( Person.query.filter(Person.name == name) .f...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-9dcb85347ac437354c6f", "dataset_id": "PyVul", "dataset_item_id": "pyvul-9dcb85347ac437354c6f", "project_id": "pyvul__spiral-project__ihatemoney", "language": "python", "backend": "codeql" }, "changed_python_files": [ ...
null
codeql
CVE-2022-3301
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-a2d122cb9e3a61ddca7a
CodeQL python
python
pyvul__ikus060__rdiffweb
pyvul-a2d122cb9e3a61ddca7a
codeql_python_benchmark51_v2/tasks/pyvul-a2d122cb9e3a61ddca7a
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/README.md b/README.md index e4eddf7d..18f11d88 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,12 @@ Professional support for Rdiffweb is available by contacting [IKUS Soft](https:/ # Changelog +## 2.4.8 (2022-09-23) + +This releases include a security fix. If you are using an earlier version, y...
# Patch-overlapping Python context before the fix ## `rdiffweb/rdw_app.py` — `class:RdiffwebApp` (lines 107-266) ```python class RdiffwebApp(Application): """This class represent the application context.""" _favicon = Option('favicon') _header_logo = Option('header_logo') _tempdir = Option('tempdir...
# Patch-overlapping Python context after the fix ## `rdiffweb/controller/tests/test_page_error.py` — `class:ErrorPageTest` (lines 29-68) ```python class ErrorPageTest(rdiffweb.test.WebCase): login = True def test_error_page(self): # Given a webserver started with production environment # Whe...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-a2d122cb9e3a61ddca7a", "dataset_id": "PyVul", "dataset_item_id": "pyvul-a2d122cb9e3a61ddca7a", "project_id": "pyvul__ikus060__rdiffweb", "language": "python", "backend": "codeql" }, "changed_python_files": [ "rdiffw...
null
codeql
CVE-2020-35653
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-a44d900bae2c75f9ea8d
CodeQL python
python
pyvul__python-pillow__pillow
pyvul-a44d900bae2c75f9ea8d
codeql_python_benchmark51_v2/tasks/pyvul-a44d900bae2c75f9ea8d
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/Tests/images/ossfuzz-4836216264589312.pcx b/Tests/images/ossfuzz-4836216264589312.pcx new file mode 100644 index 0000000000000000000000000000000000000000..fdde9716a0cbd84900f9499c2f8c6d13067d456a GIT binary patch literal 129 wcmd;LP+(+WP*4Ej|6rg11t1QLjY`90z%&y`Cj@}_2tCMbm<ohC5DTmV00Yb}N&o-= literal 0 HcmV...
# Patch-overlapping Python context before the fix ## `Tests/test_image.py` — `class:TestImage` (lines 21-815) ```python class TestImage: def test_image_modes_success(self): for mode in [ "1", "P", "PA", "L", "LA", "La", "F...
# Patch-overlapping Python context after the fix ## `Tests/test_image.py` — `class:TestImage` (lines 21-818) ```python class TestImage: def test_image_modes_success(self): for mode in [ "1", "P", "PA", "L", "LA", "La", "F"...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-a44d900bae2c75f9ea8d", "dataset_id": "PyVul", "dataset_item_id": "pyvul-a44d900bae2c75f9ea8d", "project_id": "pyvul__python-pillow__pillow", "language": "python", "backend": "codeql" }, "changed_python_files": [ "Te...
null
codeql
CVE-2021-34363
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-b10e0389c54d164db5b4
CodeQL python
python
pyvul__nvbn__thefuck
pyvul-b10e0389c54d164db5b4
codeql_python_benchmark51_v2/tasks/pyvul-b10e0389c54d164db5b4
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/thefuck/rules/dirty_untar.py b/thefuck/rules/dirty_untar.py index d94958b..638aa87 100644 --- a/thefuck/rules/dirty_untar.py +++ b/thefuck/rules/dirty_untar.py @@ -41,6 +41,10 @@ def get_new_command(command): def side_effect(old_cmd, command): with tarfile.TarFile(_tar_file(old_cmd.script_parts)[0]) ...
# Patch-overlapping Python context before the fix ## `thefuck/rules/dirty_untar.py` — `function:side_effect` (lines 41-49) ```python def side_effect(old_cmd, command): with tarfile.TarFile(_tar_file(old_cmd.script_parts)[0]) as archive: for file in archive.getnames(): try: os.r...
# Patch-overlapping Python context after the fix ## `thefuck/rules/dirty_untar.py` — `function:side_effect` (lines 41-53) ```python def side_effect(old_cmd, command): with tarfile.TarFile(_tar_file(old_cmd.script_parts)[0]) as archive: for file in archive.getnames(): if not os.path.abspath(fil...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-b10e0389c54d164db5b4", "dataset_id": "PyVul", "dataset_item_id": "pyvul-b10e0389c54d164db5b4", "project_id": "pyvul__nvbn__thefuck", "language": "python", "backend": "codeql" }, "changed_python_files": [ "thefuck/ru...
null
codeql
CVE-2014-1938
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-b5417e7c5b6909a4c5f9
CodeQL python
python
pyvul__alex__rply
pyvul-b5417e7c5b6909a4c5f9
codeql_python_benchmark51_v2/tasks/pyvul-b5417e7c5b6909a4c5f9
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/rply/parsergenerator.py b/rply/parsergenerator.py index f2ed8ee..995f78e 100644 --- a/rply/parsergenerator.py +++ b/rply/parsergenerator.py @@ -8,6 +8,8 @@ import sys import tempfile import warnings +from appdirs import AppDirs + from rply.errors import ParserGeneratorError, ParserGeneratorWarning fr...
# Patch-overlapping Python context before the fix ## `rply/parsergenerator.py` — `class:ParserGenerator` (lines 20-234) ```python class ParserGenerator(object): """ A ParserGenerator represents a set of production rules, that define a sequence of terminals and non-terminals to be replaced with a non-termi...
# Patch-overlapping Python context after the fix ## `rply/parsergenerator.py` — `class:ParserGenerator` (lines 22-220) ```python class ParserGenerator(object): """ A ParserGenerator represents a set of production rules, that define a sequence of terminals and non-terminals to be replaced with a non-termin...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-b5417e7c5b6909a4c5f9", "dataset_id": "PyVul", "dataset_item_id": "pyvul-b5417e7c5b6909a4c5f9", "project_id": "pyvul__alex__rply", "language": "python", "backend": "codeql" }, "changed_python_files": [ "rply/parserge...
null
codeql
CVE-2021-21360
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-bae2a9b05bba64edb040
CodeQL python
python
pyvul__zopefoundation__products.genericsetup
pyvul-bae2a9b05bba64edb040
codeql_python_benchmark51_v2/tasks/pyvul-bae2a9b05bba64edb040
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/CHANGES.rst b/CHANGES.rst index 60d0d82..cc2aad0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changelog 2.1.1 (unreleased) ------------------ -- Enforce access control on setup tool log files +- Enforce access control on setup tool log files and snapshot files and folders. (`#101 <http...
# Patch-overlapping Python context before the fix ## `src/Products/GenericSetup/context.py` — `class:SnapshotExportContext` (lines 471-565) ```python class SnapshotExportContext(BaseContext): security = ClassSecurityInfo() def __init__(self, tool, snapshot_id, encoding=None): BaseContext.__init__(s...
# Patch-overlapping Python context after the fix ## `src/Products/GenericSetup/context.py` — `class:SnapshotExportContext` (lines 472-572) ```python class SnapshotExportContext(BaseContext): security = ClassSecurityInfo() def __init__(self, tool, snapshot_id, encoding=None): BaseContext.__init__(se...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-bae2a9b05bba64edb040", "dataset_id": "PyVul", "dataset_item_id": "pyvul-bae2a9b05bba64edb040", "project_id": "pyvul__zopefoundation__products.genericsetup", "language": "python", "backend": "codeql" }, "changed_python_f...
null
codeql
CVE-2022-24302
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-bf4aded7c76d99f9ef84
CodeQL python
python
pyvul__paramiko__paramiko
pyvul-bf4aded7c76d99f9ef84
codeql_python_benchmark51_v2/tasks/pyvul-bf4aded7c76d99f9ef84
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 7865a6ea..67945261 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -558,7 +558,17 @@ class PKey(object): :raises: ``IOError`` -- if there was an error writing the file. """ - with open(filename, "w") as f: + # Ensure that w...
# Patch-overlapping Python context before the fix ## `paramiko/pkey.py` — `class:PKey` (lines 62-653) ```python class PKey(object): """ Base class for public keys. """ # known encryption types for private key files: _CIPHER_TABLE = { "AES-128-CBC": { "cipher": algorithms.AES, ...
# Patch-overlapping Python context after the fix ## `paramiko/pkey.py` — `class:PKey` (lines 62-663) ```python class PKey(object): """ Base class for public keys. """ # known encryption types for private key files: _CIPHER_TABLE = { "AES-128-CBC": { "cipher": algorithms.AES, ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-bf4aded7c76d99f9ef84", "dataset_id": "PyVul", "dataset_item_id": "pyvul-bf4aded7c76d99f9ef84", "project_id": "pyvul__paramiko__paramiko", "language": "python", "backend": "codeql" }, "changed_python_files": [ "param...
null
codeql
CVE-2021-43854
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-c4ca067f7fd871d25376
CodeQL python
python
pyvul__nltk__nltk
pyvul-c4ca067f7fd871d25376
codeql_python_benchmark51_v2/tasks/pyvul-c4ca067f7fd871d25376
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/nltk/tokenize/punkt.py b/nltk/tokenize/punkt.py index a08ff4c90..54937b9ec 100644 --- a/nltk/tokenize/punkt.py +++ b/nltk/tokenize/punkt.py @@ -266,7 +266,6 @@ class PunktLanguageVars: return self._word_tokenizer_re().findall(s) _period_context_fmt = r""" - \S* ...
# Patch-overlapping Python context before the fix ## `nltk/tokenize/punkt.py` — `class:PunktLanguageVars` (lines 182-294) ```python class PunktLanguageVars: """ Stores variables, mostly regular expressions, which may be language-dependent for correct application of the algorithm. An extension of this ...
# Patch-overlapping Python context after the fix ## `nltk/tokenize/punkt.py` — `class:PunktLanguageVars` (lines 182-293) ```python class PunktLanguageVars: """ Stores variables, mostly regular expressions, which may be language-dependent for correct application of the algorithm. An extension of this c...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-c4ca067f7fd871d25376", "dataset_id": "PyVul", "dataset_item_id": "pyvul-c4ca067f7fd871d25376", "project_id": "pyvul__nltk__nltk", "language": "python", "backend": "codeql" }, "changed_python_files": [ "nltk/tokenize...
null
codeql
CVE-2023-2800
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-c52f0447bb0aa65cf9a4
CodeQL python
python
pyvul__huggingface__transformers
pyvul-c52f0447bb0aa65cf9a4
codeql_python_benchmark51_v2/tasks/pyvul-c52f0447bb0aa65cf9a4
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/src/transformers/utils/hub.py b/src/transformers/utils/hub.py index 58aac59d24..335547f2b8 100644 --- a/src/transformers/utils/hub.py +++ b/src/transformers/utils/hub.py @@ -578,7 +578,7 @@ def download_url(url, proxies=None): " that this is not compatible with the caching system (your file will b...
# Patch-overlapping Python context before the fix ## `src/transformers/utils/hub.py` — `function:download_url` (lines 561-584) ```python def download_url(url, proxies=None): """ Downloads a given url in a temporary file. This function is not safe to use in multiple processes. Its only use is for deprecate...
# Patch-overlapping Python context after the fix ## `src/transformers/utils/hub.py` — `function:download_url` (lines 561-584) ```python def download_url(url, proxies=None): """ Downloads a given url in a temporary file. This function is not safe to use in multiple processes. Its only use is for deprecated...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-c52f0447bb0aa65cf9a4", "dataset_id": "PyVul", "dataset_item_id": "pyvul-c52f0447bb0aa65cf9a4", "project_id": "pyvul__huggingface__transformers", "language": "python", "backend": "codeql" }, "changed_python_files": [ ...
null
codeql
CVE-2022-4724
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-cb3f3f84ff4550031205
CodeQL python
python
pyvul__ikus060__rdiffweb
pyvul-cb3f3f84ff4550031205
codeql_python_benchmark51_v2/tasks/pyvul-cb3f3f84ff4550031205
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/README.md b/README.md index 8d357d64..a4294793 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ Professional support for Rdiffweb is available by contacting [IKUS Soft](https:/ * Sent email notification to user when a new SSH Key get added - credit to [Nehal Pillai](https://www.linkedin.com/in/n...
# Patch-overlapping Python context before the fix ## `rdiffweb/core/model/__init__.py` — `module:<module>@22` (lines 22-22) ```python from sqlalchemy import event ``` ## `rdiffweb/core/model/__init__.py` — `module:<module>@23` (lines 23-23) ```python from sqlalchemy.exc import IntegrityError ``` ## `rdiffweb/core/...
# Patch-overlapping Python context after the fix ## `rdiffweb/core/model/__init__.py` — `function:db_after_create` (lines 70-158) ```python def db_after_create(target, connection, **kw): """ Called on database creation to update database schema. """ if getattr(connection, '_transaction', None): ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-cb3f3f84ff4550031205", "dataset_id": "PyVul", "dataset_item_id": "pyvul-cb3f3f84ff4550031205", "project_id": "pyvul__ikus060__rdiffweb", "language": "python", "backend": "codeql" }, "changed_python_files": [ "rdiffw...
null
codeql
CVE-2023-49080
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-d005a7cf5935ac7e7aae
CodeQL python
python
pyvul__jupyter-server__jupyter_server
pyvul-d005a7cf5935ac7e7aae
codeql_python_benchmark51_v2/tasks/pyvul-d005a7cf5935ac7e7aae
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/jupyter_server/base/handlers.py b/jupyter_server/base/handlers.py index e6e6b3246..b1b783cca 100644 --- a/jupyter_server/base/handlers.py +++ b/jupyter_server/base/handlers.py @@ -10,7 +10,6 @@ import json import mimetypes import os import re -import traceback import types import warnings from http.c...
# Patch-overlapping Python context before the fix ## `jupyter_server/base/handlers.py` — `class:APIHandler` (lines 726-832) ```python class APIHandler(JupyterHandler): """Base class for API handlers""" async def prepare(self) -> None: """Prepare an API response.""" await super().prepare() ...
# Patch-overlapping Python context after the fix ## `jupyter_server/base/handlers.py` — `class:APIHandler` (lines 725-833) ```python class APIHandler(JupyterHandler): """Base class for API handlers""" async def prepare(self) -> None: """Prepare an API response.""" await super().prepare() ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-d005a7cf5935ac7e7aae", "dataset_id": "PyVul", "dataset_item_id": "pyvul-d005a7cf5935ac7e7aae", "project_id": "pyvul__jupyter-server__jupyter_server", "language": "python", "backend": "codeql" }, "changed_python_files": ...
null
codeql
CVE-2021-21386
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-d38a3c1956e86350a0c7
CodeQL python
python
pyvul__dwisiswant0__apkleaks
pyvul-d38a3c1956e86350a0c7
codeql_python_benchmark51_v2/tasks/pyvul-d38a3c1956e86350a0c7
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/apkleaks/apkleaks.py b/apkleaks/apkleaks.py index c51c75e..e1e084f 100644 --- a/apkleaks/apkleaks.py +++ b/apkleaks/apkleaks.py @@ -2,6 +2,7 @@ from apkleaks.colors import clr from contextlib import closing from distutils.spawn import find_executable +from pipes import quote from pyaxmlparser import AP...
# Patch-overlapping Python context before the fix ## `apkleaks/apkleaks.py` — `class:APKLeaks` (lines 20-143) ```python class APKLeaks: def __init__(self, args): self.file = args.file self.prefix = "apkleaks-" self.tempdir = tempfile.mkdtemp(prefix=self.prefix) self.main_dir = os.path.dirname(os.path.realpat...
# Patch-overlapping Python context after the fix ## `apkleaks/apkleaks.py` — `class:APKLeaks` (lines 21-145) ```python class APKLeaks: def __init__(self, args): self.file = args.file self.prefix = "apkleaks-" self.tempdir = tempfile.mkdtemp(prefix=self.prefix) self.main_dir = os.path.dirname(os.path.realpath...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-d38a3c1956e86350a0c7", "dataset_id": "PyVul", "dataset_item_id": "pyvul-d38a3c1956e86350a0c7", "project_id": "pyvul__dwisiswant0__apkleaks", "language": "python", "backend": "codeql" }, "changed_python_files": [ "ap...
null
codeql
CVE-2023-5002
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-dbcc9a178b256c49887e
CodeQL python
python
pyvul__pgadmin-org__pgadmin4
pyvul-dbcc9a178b256c49887e
codeql_python_benchmark51_v2/tasks/pyvul-dbcc9a178b256c49887e
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/web/pgadmin/misc/__init__.py b/web/pgadmin/misc/__init__.py index 15adccf51..451271e07 100644 --- a/web/pgadmin/misc/__init__.py +++ b/web/pgadmin/misc/__init__.py @@ -13,7 +13,8 @@ from pgadmin.utils import driver from flask import url_for, render_template, Response, request, current_app from flask_babe...
# Patch-overlapping Python context before the fix ## `web/pgadmin/misc/__init__.py` — `function:validate_binary_path` (lines 239-291) ```python def validate_binary_path(): """ This function is used to validate the specified utilities path by running the utilities with their versions. """ data = No...
# Patch-overlapping Python context after the fix ## `web/pgadmin/misc/__init__.py` — `function:validate_binary_path` (lines 240-268) ```python def validate_binary_path(): """ This function is used to validate the specified utilities path by running the utilities with their versions. """ data = Non...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-dbcc9a178b256c49887e", "dataset_id": "PyVul", "dataset_item_id": "pyvul-dbcc9a178b256c49887e", "project_id": "pyvul__pgadmin-org__pgadmin4", "language": "python", "backend": "codeql" }, "changed_python_files": [ "we...
null
codeql
CVE-2023-38201
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-e305522c703de57f9ede
CodeQL python
python
pyvul__keylime__keylime
pyvul-e305522c703de57f9ede
codeql_python_benchmark51_v2/tasks/pyvul-e305522c703de57f9ede
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/keylime/registrar_common.py b/keylime/registrar_common.py index 1fd97cd..7f15ae4 100644 --- a/keylime/registrar_common.py +++ b/keylime/registrar_common.py @@ -250,7 +250,9 @@ class UnprotectedHandler(BaseHandler): try: port = int(port) if port < 1 or port > 6...
# Patch-overlapping Python context before the fix ## `keylime/registrar_common.py` — `class:UnprotectedHandler` (lines 204-466) ```python class UnprotectedHandler(BaseHandler): def do_HEAD(self) -> None: """HEAD not supported""" web_util.echo_json_response(self, 405, "HEAD not supported") def...
# Patch-overlapping Python context after the fix ## `keylime/registrar_common.py` — `class:UnprotectedHandler` (lines 204-477) ```python class UnprotectedHandler(BaseHandler): def do_HEAD(self) -> None: """HEAD not supported""" web_util.echo_json_response(self, 405, "HEAD not supported") def ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-e305522c703de57f9ede", "dataset_id": "PyVul", "dataset_item_id": "pyvul-e305522c703de57f9ede", "project_id": "pyvul__keylime__keylime", "language": "python", "backend": "codeql" }, "changed_python_files": [ "keylime...
null
codeql
CVE-2023-45139
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-e73df8c8998a1ddc180a
CodeQL python
python
pyvul__fonttools__fonttools
pyvul-e73df8c8998a1ddc180a
codeql_python_benchmark51_v2/tasks/pyvul-e73df8c8998a1ddc180a
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/Lib/fontTools/subset/svg.py b/Lib/fontTools/subset/svg.py index f6d74a400..2e55bf54c 100644 --- a/Lib/fontTools/subset/svg.py +++ b/Lib/fontTools/subset/svg.py @@ -225,6 +225,9 @@ def subset_glyphs(self, s) -> bool: # ignore blank text as it's not meaningful in OT-SVG; it also prevents ...
# Patch-overlapping Python context before the fix ## `Lib/fontTools/subset/svg.py` — `function:subset_glyphs` (lines 193-251) ```python def subset_glyphs(self, s) -> bool: if etree is None: raise ImportError("No module named 'lxml', required to subset SVG") # glyph names (before subsetting) glyph...
# Patch-overlapping Python context after the fix ## `Lib/fontTools/subset/svg.py` — `function:subset_glyphs` (lines 193-254) ```python def subset_glyphs(self, s) -> bool: if etree is None: raise ImportError("No module named 'lxml', required to subset SVG") # glyph names (before subsetting) glyph_...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-e73df8c8998a1ddc180a", "dataset_id": "PyVul", "dataset_item_id": "pyvul-e73df8c8998a1ddc180a", "project_id": "pyvul__fonttools__fonttools", "language": "python", "backend": "codeql" }, "changed_python_files": [ "Lib...
null
codeql
CVE-2021-39229
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-f55f7c013a9f5bd1eb0d
CodeQL python
python
pyvul__caronc__apprise
pyvul-f55f7c013a9f5bd1eb0d
codeql_python_benchmark51_v2/tasks/pyvul-f55f7c013a9f5bd1eb0d
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/apprise/plugins/NotifyIFTTT.py b/apprise/plugins/NotifyIFTTT.py index c038a9e..b735a4d 100644 --- a/apprise/plugins/NotifyIFTTT.py +++ b/apprise/plugins/NotifyIFTTT.py @@ -355,7 +355,7 @@ class NotifyIFTTT(NotifyBase): result = re.match( r'^https?://maker\.ifttt\.com/use/' ...
# Patch-overlapping Python context before the fix ## `apprise/plugins/NotifyIFTTT.py` — `class:NotifyIFTTT` (lines 53-371) ```python class NotifyIFTTT(NotifyBase): """ A wrapper for IFTTT Notifications """ # The default descriptive name associated with the Notification service_name = 'IFTTT' ...
# Patch-overlapping Python context after the fix ## `apprise/plugins/NotifyIFTTT.py` — `class:NotifyIFTTT` (lines 53-371) ```python class NotifyIFTTT(NotifyBase): """ A wrapper for IFTTT Notifications """ # The default descriptive name associated with the Notification service_name = 'IFTTT' ...
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-f55f7c013a9f5bd1eb0d", "dataset_id": "PyVul", "dataset_item_id": "pyvul-f55f7c013a9f5bd1eb0d", "project_id": "pyvul__caronc__apprise", "language": "python", "backend": "codeql" }, "changed_python_files": [ "apprise/...
null
codeql
CVE-2023-45813
codeql_python_benchmark51_v2
codeql_python_benchmark51_v2/pyvul-ff1e02f88768f34e43fb
CodeQL python
python
pyvul__dedsecinside__torbot
pyvul-ff1e02f88768f34e43fb
codeql_python_benchmark51_v2/tasks/pyvul-ff1e02f88768f34e43fb
# Python CodeQL detector synthesis You are cc operating in `/work`. Starting only from the supplied patch, before/after Python context, CodeQL references, and validation tools, synthesize a semantic CodeQL detector for the vulnerability fixed by the patch. This is one fresh session. You may iterate inside this session...
diff --git a/torbot/modules/validators.py b/torbot/modules/validators.py deleted file mode 100644 index a8e78c3..0000000 --- a/torbot/modules/validators.py +++ /dev/null @@ -1,13 +0,0 @@ -import validators - - -def validate_email(email): - if not isinstance(email, str): - return False - return validators.e...
# Patch-overlapping Python context before the fix ## `torbot/modules/validators.py` — `function:validate_email` (lines 4-7) ```python def validate_email(email): if not isinstance(email, str): return False return validators.email(email) ``` ## `torbot/modules/validators.py` — `function:validate_link` ...
# Patch-overlapping Python context after the fix No patch-overlapping Python semantic unit exists on this side.
{ "schema_version": "synthesis-task-v1", "task": { "pair_id": "pyvul-ff1e02f88768f34e43fb", "dataset_id": "PyVul", "dataset_item_id": "pyvul-ff1e02f88768f34e43fb", "project_id": "pyvul__dedsecinside__torbot", "language": "python", "backend": "codeql" }, "changed_python_files": [ "tor...
null
csa
CVE-2014-0749
csa159
csa159/pair_134585
CSA
c/c++
adaptivecomputing_torque
pair_134585
csa159/tasks/pair_134585
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/lib/Libdis/disrsi_.c b/src/lib/Libdis/disrsi_.c index 69edd2803..154514c27 100644 --- a/src/lib/Libdis/disrsi_.c +++ b/src/lib/Libdis/disrsi_.c @@ -112,6 +112,15 @@ int disrsi_( if (dis_umaxd == 0) disiui_(); + if (count >= dis_umaxd) + { + if (count > dis_umaxd) + goto overflow; ...
### File: src/lib/Libdis/disrsi_.c ```c int disrsi_( int stream, int *negate, unsigned *value, unsigned count) { int c; unsigned locval; unsigned ndigs; char *cp; char scratch[DIS_BUFSIZ+1]; assert(negate != NULL); assert(value != NULL); assert(count); assert(stream >= 0); ...
### File: src/lib/Libdis/disrsi_.c ```c int disrsi_( int stream, int *negate, unsigned *value, unsigned count) { int c; unsigned locval; unsigned ndigs; char *cp; char scratch[DIS_BUFSIZ+1]; assert(negate != NULL); assert(value != NULL); assert(count); assert(stream >= 0); ...
{ "project_id": "adaptivecomputing_torque", "before_commit": "94480e87f9779363780f4cf8d35831663ab354f4", "after_commit": "3ed749263abe3d69fa3626d142a5789dcb5a5684", "repo_path": "/workspace/repo/adaptivecomputing/torque", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-p...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2017-8911
csa159
csa159/pair_135745
CSA
c/c++
verdammelt_tnef
pair_135745
csa159/tasks/pair_135745
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/mapi_attr.c b/src/mapi_attr.c index 3f3250b..455cc67 100644 --- a/src/mapi_attr.c +++ b/src/mapi_attr.c @@ -211,6 +211,8 @@ mapi_attr_read (size_t len, unsigned char *buf) CHECKINT32(idx, len); a->names[i].len = GETINT32(buf+idx); idx += 4; /* read the data into a buffer */ + ...
### File: src/mapi_attr.c ```c MAPI_Attr** mapi_attr_read (size_t len, unsigned char *buf) { size_t idx = 0; uint32 i,j; assert(len > 4); uint32 num_properties = GETINT32(buf+idx); assert((num_properties+1) != 0); MAPI_Attr** attrs = CHECKED_XMALLOC (MAPI_Attr*, (num_properties + 1)); idx +...
### File: src/mapi_attr.c ```c MAPI_Attr** mapi_attr_read (size_t len, unsigned char *buf) { size_t idx = 0; uint32 i,j; assert(len > 4); uint32 num_properties = GETINT32(buf+idx); assert((num_properties+1) != 0); MAPI_Attr** attrs = CHECKED_XMALLOC (MAPI_Attr*, (num_properties + 1)); idx +...
{ "project_id": "verdammelt_tnef", "before_commit": "5af0791db67d50ce5ebc16252626c679bb4079fb", "after_commit": "cfdd80f52b31215bb4cf59ffb6e1bf5be93ead7c", "repo_path": "/workspace/repo/verdammelt/tnef", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2014-8127
csa159
csa159/pair_136342
CSA
c/c++
vadz_libtiff
pair_136342
csa159/tasks/pair_136342
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/ChangeLog b/ChangeLog index 2dc5f4b5..0f070dd9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-12-21 Even Rouault <even.rouault@spatialys.com> + + * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAG_INKNAMES + copying. The right fix would be to properly copy it, but not wor...
### File: tools/pal2rgb.c ```c /* $Id$ */ /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyrig...
### File: tools/pal2rgb.c ```c /* $Id$ */ /* * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyrig...
{ "project_id": "vadz_libtiff", "before_commit": "3206e0c752a62da1ae606867113ed3bf9bf73306", "after_commit": "3996fa0f84f4a8b7e65fe4b8f0681711022034ea", "repo_path": "/workspace/repo/vadz/libtiff", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/vadz_l...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2019-9893
csa159
csa159/pair_137674
CSA
c/c++
seccomp_libseccomp
pair_137674
csa159/tasks/pair_137674
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/db.c b/src/db.c index da0dc16..64e0924 100644 --- a/src/db.c +++ b/src/db.c @@ -2,6 +2,7 @@ * Enhanced Seccomp Filter DB * * Copyright (c) 2012,2016,2018 Red Hat <pmoore@redhat.com> + * Copyright (c) 2019 Cisco Systems, Inc. <pmoore2@cisco.com> * Author: Paul Moore <paul@paul-moore.com> */ ...
### File: src/db.c ```c static bool _db_chain_lt(const struct db_arg_chain_tree *a, const struct db_arg_chain_tree *b) { return ((a->arg < b->arg) || ((a->arg == b->arg) && ((a->op < b->op) || ((a->op == b->op) && ((a->mask < b->mask) || ((a->mask == b->mask) && (a->datum < b->datum)))))...
### File: src/db.c ```c static unsigned int __db_chain_arg_priority(const struct db_arg_chain_tree *a) { return (a->arg << 1) + (a->arg_h_flg ? 1 : 0); } static unsigned int __db_chain_op_priority(enum scmp_compare op) { /* the distinction between LT/LT and GT/GE is mostly to make the * ordering as repeatable as p...
{ "project_id": "seccomp_libseccomp", "before_commit": "3e5a13d65ad16c60c659e0c471673def2c774d2a", "after_commit": "c5bf78de480b32b324e0f511c88ce533ed280b37", "repo_path": "/workspace/repo/seccomp/libseccomp", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snap...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2014-5388
csa159
csa159/pair_137782
CSA
c/c++
qemu_qemu
pair_137782
csa159/tasks/pair_137782
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index fae663af11..34dedf1e8b 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -231,7 +231,7 @@ static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size) uint32_t val = 0; int bsel = s->hotplug_select; - if (bsel < 0 || bsel > ACPI_PCIHP_MAX...
### File: hw/acpi/pcihp.c ```c static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size) { AcpiPciHpState *s = opaque; uint32_t val = 0; int bsel = s->hotplug_select; if (bsel < 0 || bsel > ACPI_PCIHP_MAX_HOTPLUG_BUS) { return 0; } switch (addr) { case PCI_UP_BASE: ...
### File: hw/acpi/pcihp.c ```c static uint64_t pci_read(void *opaque, hwaddr addr, unsigned int size) { AcpiPciHpState *s = opaque; uint32_t val = 0; int bsel = s->hotplug_select; if (bsel < 0 || bsel >= ACPI_PCIHP_MAX_HOTPLUG_BUS) { return 0; } switch (addr) { case PCI_UP_BASE: ...
{ "project_id": "qemu_qemu", "before_commit": "9f6b2f1c6497adcce4dec9b3bd1f1e78877a03dd", "after_commit": "fa365d7cd11185237471823a5a33d36765454e16", "repo_path": "/workspace/repo/qemu/qemu", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/qemu_qemu/82...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-9501
csa159
csa159/pair_138263
CSA
c/c++
LibreDWG_libredwg
pair_138263
csa159/tasks/pair_138263
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/decode.c b/src/decode.c index fd8575ad..1bb48962 100644 --- a/src/decode.c +++ b/src/decode.c @@ -1284,6 +1284,14 @@ decompress_R2004_section (Bit_Chain *restrict src, Bit_Chain *restrict dec) opcode1 = 0x11; LOG_INSANE (">O %x!\n", opcode1); } + if (end > dec->size ...
### File: src/decode.c ```c int decompress_R2004_section (Bit_Chain *restrict src, Bit_Chain *restrict dec) { unsigned int lit_length; int comp_offset, comp_bytes; size_t pos, end; unsigned char opcode1 = 0, opcode2; if (src->byte > src->size) // bytes left to read from { LOG_WARN ("Invalid comp_da...
### File: src/decode.c ```c int decompress_R2004_section (Bit_Chain *restrict src, Bit_Chain *restrict dec) { unsigned int lit_length; int comp_offset, comp_bytes; size_t pos, end; unsigned char opcode1 = 0, opcode2; if (src->byte > src->size) // bytes left to read from { LOG_WARN ("Invalid comp_da...
{ "project_id": "LibreDWG_libredwg", "before_commit": "8f03865f37f5d4ffd616fef802acc980be54d300", "after_commit": "e501cb9926c1e9a07a0d1cc997f3e69e9be801c9", "repo_path": "/workspace/repo/LibreDWG/libredwg", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapsh...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2019-20022
csa159
csa159/pair_138473
CSA
c/c++
saitoha_libsixel
pair_138473
csa159/tasks/pair_138473
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/frompnm.c b/src/frompnm.c index 44529db..86d0c03 100644 --- a/src/frompnm.c +++ b/src/frompnm.c @@ -166,7 +166,7 @@ load_pnm(unsigned char /* in */ *p, height = 0; for (; *s >= '0' && *s <= '9'; ++s) { height = height * 10 + (*s - '0'); - if (width > PNM_MAX_WIDTH) { + ...
### File: src/frompnm.c ```c SIXELSTATUS load_pnm(unsigned char /* in */ *p, int /* in */ length, sixel_allocator_t /* in */ *allocator, unsigned char /* out */ **result, int /* out */ *psx, int /* out */ *psy, ...
### File: src/frompnm.c ```c SIXELSTATUS load_pnm(unsigned char /* in */ *p, int /* in */ length, sixel_allocator_t /* in */ *allocator, unsigned char /* out */ **result, int /* out */ *psx, int /* out */ *psy, ...
{ "project_id": "saitoha_libsixel", "before_commit": "77c8077232baaa3b10638caec47a7aa9d78b2fb4", "after_commit": "e17c0765ed708186865f0f8badfed44181063776", "repo_path": "/workspace/repo/saitoha/libsixel", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshot...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-33165
csa159
csa159/pair_138511
CSA
c/c++
strukturag_libde265
pair_138511
csa159/tasks/pair_138511
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/libde265/image.cc b/libde265/image.cc index d388901..204faa5 100644 --- a/libde265/image.cc +++ b/libde265/image.cc @@ -452,8 +452,9 @@ de265_error de265_image::alloc_image(int w,int h, enum de265_chroma c, // CTB info - if (ctb_info.width_in_units != sps->PicWidthInCtbsY || - ctb_info.h...
### File: libde265/image.cc ```c de265_error de265_image::alloc_image(int w,int h, enum de265_chroma c, std::shared_ptr<const seq_parameter_set> sps, bool allocMetadata, decoder_context* dctx, //encoder_contex...
### File: libde265/image.cc ```c de265_error de265_image::alloc_image(int w,int h, enum de265_chroma c, std::shared_ptr<const seq_parameter_set> sps, bool allocMetadata, decoder_context* dctx, //encoder_contex...
{ "project_id": "strukturag_libde265", "before_commit": "436466daed8cdb6a3ad1fdefa1410140a7d5f9e5", "after_commit": "c7891e412106130b83f8e8ea8b7f907e9449b658", "repo_path": "/workspace/repo/strukturag/libde265", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/sn...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-48367
csa159
csa159/pair_138570
CSA
c/c++
redis_redis
pair_138570
csa159/tasks/pair_138570
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/anet.c b/src/anet.c index ad4ac49d8..d79434cef 100644 --- a/src/anet.c +++ b/src/anet.c @@ -787,3 +787,27 @@ int anetIsFifo(char *filepath) { if (stat(filepath, &sb) == -1) return 0; return S_ISFIFO(sb.st_mode); } + +/* This function must be called after accept4() fails. It returns 1 if 'err...
### File: src/anet.c ```c int anetSetSockMarkId(char *err, int fd, uint32_t id) { #ifdef HAVE_SOCKOPTMARKID if (setsockopt(fd, SOL_SOCKET, SOCKOPTMARKID, (void *)&id, sizeof(id)) == -1) { anetSetError(err, "setsockopt: %s", strerror(errno)); return ANET_ERR; } return ANET_OK; #else UNUSE...
### File: src/anet.c ```c int anetIsFifo(char *filepath) { struct stat sb; if (stat(filepath, &sb) == -1) return 0; return S_ISFIFO(sb.st_mode); } ``` ### File: src/cluster_legacy.c ```c void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { int cport, cfd; int max = MAX_CLU...
{ "project_id": "redis_redis", "before_commit": "50188747cbfe43528d2719399a2a3c9599169445", "after_commit": "bde62951accfc4bb0a516276fd0b4b307e140ce2", "repo_path": "/workspace/repo/redis/redis", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/redis_re...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2024-25269
csa159
csa159/pair_138644
CSA
c/c++
strukturag_libheif
pair_138644
csa159/tasks/pair_138644
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/examples/encoder_png.cc b/examples/encoder_png.cc index a24b0593..8b918f96 100644 --- a/examples/encoder_png.cc +++ b/examples/encoder_png.cc @@ -117,15 +117,16 @@ bool PngEncoder::Encode(const struct heif_image_handle* handle, if (exifdata) { if (exifsize > 4) { uint32_t skip = (exifdata[0]...
### File: examples/encoder_png.cc ```c bool PngEncoder::Encode(const struct heif_image_handle* handle, const struct heif_image* image, const std::string& filename) { png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nu...
### File: examples/encoder_png.cc ```c bool PngEncoder::Encode(const struct heif_image_handle* handle, const struct heif_image* image, const std::string& filename) { png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nu...
{ "project_id": "strukturag_libheif", "before_commit": "fc9ad8469eebf742c119981fa0e4b1eca7888c4a", "after_commit": "2591939c530c2406dd9c8ab63d0f3a73622358ca", "repo_path": "/workspace/repo/strukturag/libheif", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snap...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-62171
csa159
csa159/pair_138710
CSA
c/c++
ImageMagick_ImageMagick
pair_138710
csa159/tasks/pair_138710
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/coders/bmp.c b/coders/bmp.c index e3f09a35d..4ba25c004 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -1117,6 +1117,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); if (bmp_info.compression == B...
### File: coders/bmp.c ```c static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) { BMPInfo bmp_info; Image *image; MagickBooleanType ignore_filesize, status; MagickOffsetType offset, profile_data, profile_size, start_position; MagickSizeType ...
### File: coders/bmp.c ```c static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) { BMPInfo bmp_info; Image *image; MagickBooleanType ignore_filesize, status; MagickOffsetType offset, profile_data, profile_size, start_position; MagickSizeType ...
{ "project_id": "ImageMagick_ImageMagick", "before_commit": "677d7b743fcbd7132ac11dade52a19493f58f647", "after_commit": "cea1693e2ded51b4cc91c70c54096cbed1691c00", "repo_path": "/workspace/repo/ImageMagick/ImageMagick", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pip...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-48923
csa159
csa159/pair_139922
CSA
c/c++
torvalds_linux
pair_139922
csa159/tasks/pair_139922
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c index 0fb90cbe7669..e6e28a9c7987 100644 --- a/fs/btrfs/lzo.c +++ b/fs/btrfs/lzo.c @@ -380,6 +380,17 @@ int lzo_decompress_bio(struct list_head *ws, struct compressed_bio *cb) kunmap(cur_page); cur_in += LZO_LEN; + if (seg_len > lzo1x_worst_compress(PAGE_SIZE)) { + ...
### File: fs/btrfs/lzo.c ```c int lzo_decompress_bio(struct list_head *ws, struct compressed_bio *cb) { struct workspace *workspace = list_entry(ws, struct workspace, list); const struct btrfs_fs_info *fs_info = btrfs_sb(cb->inode->i_sb); const u32 sectorsize = fs_info->sectorsize; char *kaddr; int ret; /* Compre...
### File: fs/btrfs/lzo.c ```c int lzo_decompress_bio(struct list_head *ws, struct compressed_bio *cb) { struct workspace *workspace = list_entry(ws, struct workspace, list); const struct btrfs_fs_info *fs_info = btrfs_sb(cb->inode->i_sb); const u32 sectorsize = fs_info->sectorsize; char *kaddr; int ret; /* Compre...
{ "project_id": "torvalds_linux", "before_commit": "2e7be9db125a0bf940c5d65eb5c40d8700f738b5", "after_commit": "741b23a970a79d5d3a1db2d64fa2c7b375a4febb", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-49375
csa159
csa159/pair_140347
CSA
c/c++
torvalds_linux
pair_140347
csa159/tasks/pair_140347
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c index 80dc479a6ff0..1d297af80f87 100644 --- a/drivers/rtc/rtc-mt6397.c +++ b/drivers/rtc/rtc-mt6397.c @@ -269,6 +269,8 @@ static int mtk_rtc_probe(struct platform_device *pdev) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); +...
### File: drivers/rtc/rtc-mt6397.c ```c static int mtk_rtc_probe(struct platform_device *pdev) { struct resource *res; struct mt6397_chip *mt6397_chip = dev_get_drvdata(pdev->dev.parent); struct mt6397_rtc *rtc; int ret; rtc = devm_kzalloc(&pdev->dev, sizeof(struct mt6397_rtc), GFP_KERNEL); if (!rtc) return -E...
### File: drivers/rtc/rtc-mt6397.c ```c static int mtk_rtc_probe(struct platform_device *pdev) { struct resource *res; struct mt6397_chip *mt6397_chip = dev_get_drvdata(pdev->dev.parent); struct mt6397_rtc *rtc; int ret; rtc = devm_kzalloc(&pdev->dev, sizeof(struct mt6397_rtc), GFP_KERNEL); if (!rtc) return -E...
{ "project_id": "torvalds_linux", "before_commit": "e60e8a73235ce5d42a2891c6989e8df1c8888c4a", "after_commit": "d3b43eb505bffb8e4cdf6800c15660c001553fe6", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-50419
csa159
csa159/pair_141329
CSA
c/c++
torvalds_linux
pair_141329
csa159/tasks/pair_141329
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 4e3e0451b08c..08542dfc2dc5 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@ -48,6 +48,9 @@ void hci_conn_add_sysfs(struct hci_conn *conn) BT_DBG("conn %p", conn); + if (device_is_registered(&conn->dev)) + return; + ...
### File: net/bluetooth/hci_sysfs.c ```c void hci_conn_add_sysfs(struct hci_conn *conn) { struct hci_dev *hdev = conn->hdev; BT_DBG("conn %p", conn); dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); if (device_add(&conn->dev) < 0) { bt_dev_err(hdev, "failed to register connection device"); return...
### File: net/bluetooth/hci_sysfs.c ```c void hci_conn_add_sysfs(struct hci_conn *conn) { struct hci_dev *hdev = conn->hdev; BT_DBG("conn %p", conn); if (device_is_registered(&conn->dev)) return; dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); if (device_add(&conn->dev) < 0) { bt_dev_err(hdev,...
{ "project_id": "torvalds_linux", "before_commit": "bb20da18ce936adda6b48aea79a8797c8eee479f", "after_commit": "448a496f760664d3e2e79466aa1787e6abc922b5", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2023-53148
csa159
csa159/pair_142288
CSA
c/c++
torvalds_linux
pair_142288
csa159/tasks/pair_142288
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 9fcac96022d7..9a2561409b06 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -9587,6 +9587,11 @@ static pci_ers_result_t igb_io_error_detected(struct pci_dev *...
### File: drivers/net/ethernet/intel/igb/igb_main.c ```c static pci_ers_result_t igb_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct igb_adapter *adapter = netdev_priv(netdev); netif_device_detach(netdev); if (state == pci_c...
### File: drivers/net/ethernet/intel/igb/igb_main.c ```c static pci_ers_result_t igb_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct igb_adapter *adapter = netdev_priv(netdev); if (state == pci_channel_io_normal) { dev_warn(...
{ "project_id": "torvalds_linux", "before_commit": "b2fef875aa6f78dfa89a943282d6dbeaf0dd2095", "after_commit": "004d25060c78fc31f66da0fa439c544dda1ac9d5", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2023-53532
csa159
csa159/pair_142647
CSA
c/c++
torvalds_linux
pair_142647
csa159/tasks/pair_142647
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index b549576d0b51..5cbba9a8b6ba 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -1078,6 +1078,12 @@ static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab) struct iomm...
### File: drivers/net/wireless/ath/ath11k/ahb.c ```c static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab) { struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab); struct iommu_domain *iommu; size_t unmapped_size; if (ab_ahb->fw.use_tz) return 0; iommu = ab_ahb->fw.iommu_domain; unmapped_size = iommu_un...
### File: drivers/net/wireless/ath/ath11k/ahb.c ```c static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab) { struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab); struct iommu_domain *iommu; size_t unmapped_size; /* Chipsets not requiring MSA would have not initialized * MSA resources, return success in su...
{ "project_id": "torvalds_linux", "before_commit": "3b1088a09ec9438523c251d8435e78988824bc0d", "after_commit": "5a78ac33e3cb8822da64dd1af196e83664b332b0", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-38226
csa159
csa159/pair_147034
CSA
c/c++
torvalds_linux
pair_147034
csa159/tasks/pair_147034
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/media/test-drivers/vivid/vivid-vid-cap.c b/drivers/media/test-drivers/vivid/vivid-vid-cap.c index df726961222b..84e9155b5815 100644 --- a/drivers/media/test-drivers/vivid/vivid-vid-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-vid-cap.c @@ -948,8 +948,8 @@ int vivid_vid_cap_s_selection(struct ...
### File: drivers/media/test-drivers/vivid/vivid-vid-cap.c ```c int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) { struct vivid_dev *dev = video_drvdata(file); struct v4l2_rect *crop = &dev->crop_cap; struct v4l2_rect *compose = &dev->compose_cap; unsigned factor = V4L2_FIELD_HAS...
### File: drivers/media/test-drivers/vivid/vivid-vid-cap.c ```c int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) { struct vivid_dev *dev = video_drvdata(file); struct v4l2_rect *crop = &dev->crop_cap; struct v4l2_rect *compose = &dev->compose_cap; unsigned factor = V4L2_FIELD_HAS...
{ "project_id": "torvalds_linux", "before_commit": "5bc68bd3826e573f9a83c82c5107536cf616fea8", "after_commit": "f83ac8d30c43fd902af7c84c480f216157b60ef0", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-39773
csa159
csa159/pair_147640
CSA
c/c++
torvalds_linux
pair_147640
csa159/tasks/pair_147640
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 1377f31b719c..8ce145938b02 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -4818,6 +4818,14 @@ void br_multicast_set_query_intvl(struct net_bridge_mcast *brmctx, intvl_jiffies = BR_MULTICAST_QUERY_INTVL_MIN; } + if...
### File: net/bridge/br_multicast.c ```c void br_multicast_set_query_intvl(struct net_bridge_mcast *brmctx, unsigned long val) { unsigned long intvl_jiffies = clock_t_to_jiffies(val); if (intvl_jiffies < BR_MULTICAST_QUERY_INTVL_MIN) { br_info(brmctx->br, "trying to set multicast query interval below mini...
### File: net/bridge/br_multicast.c ```c void br_multicast_set_query_intvl(struct net_bridge_mcast *brmctx, unsigned long val) { unsigned long intvl_jiffies = clock_t_to_jiffies(val); if (intvl_jiffies < BR_MULTICAST_QUERY_INTVL_MIN) { br_info(brmctx->br, "trying to set multicast query interval below mini...
{ "project_id": "torvalds_linux", "before_commit": "fd980bf6e9cdae885105685259421164f843ca55", "after_commit": "d1547bf460baec718b3398365f8de33d25c5f36f", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-39810
csa159
csa159/pair_147676
CSA
c/c++
torvalds_linux
pair_147676
csa159/tasks/pair_147676
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 207a8bb36ae5..1f5c06f1296b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -12851,6 +12851,17 @@ static int bnxt_set_xps_mapping(struct bnxt *bp) return rc...
### File: drivers/net/ethernet/broadcom/bnxt/bnxt.c ```c static int bnxt_set_xps_mapping(struct bnxt *bp) { int numa_node = dev_to_node(&bp->pdev->dev); unsigned int q_idx, map_idx, cpu, i; const struct cpumask *cpu_mask_ptr; int nr_cpus = num_online_cpus(); cpumask_t *q_map; int rc = 0; q_map = kcalloc(bp->tx_...
### File: drivers/net/ethernet/broadcom/bnxt/bnxt.c ```c static int bnxt_set_xps_mapping(struct bnxt *bp) { int numa_node = dev_to_node(&bp->pdev->dev); unsigned int q_idx, map_idx, cpu, i; const struct cpumask *cpu_mask_ptr; int nr_cpus = num_online_cpus(); cpumask_t *q_map; int rc = 0; q_map = kcalloc(bp->tx_...
{ "project_id": "torvalds_linux", "before_commit": "d9b0ca1334d8a9a03bef45e95825564c56ca3367", "after_commit": "2747328ba2714f1a7454208dbbc1dc0631990b4a", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-71146
csa159
csa159/pair_148601
CSA
c/c++
torvalds_linux
pair_148601
csa159/tasks/pair_148601
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index f1be4dd5cf85..3654f1e8976c 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c @@ -172,14 +172,14 @@ static int __nf_conncount_add(struct net *net, struct nf_conn *found_ct; unsigned int collect = 0; bool refco...
### File: net/netfilter/nf_conncount.c ```c static int __nf_conncount_add(struct net *net, const struct sk_buff *skb, u16 l3num, struct nf_conncount_list *list) { const struct nf_conntrack_zone *zone = &nf_ct_zone_dflt; const struct nf_conntrack_tuple_hash *found; struct nf_conncount_tuple...
### File: net/netfilter/nf_conncount.c ```c static int __nf_conncount_add(struct net *net, const struct sk_buff *skb, u16 l3num, struct nf_conncount_list *list) { const struct nf_conntrack_zone *zone = &nf_ct_zone_dflt; const struct nf_conntrack_tuple_hash *found; struct nf_conncount_tuple...
{ "project_id": "torvalds_linux", "before_commit": "6bcb7727d9e612011b70d64a34401688b986d6ab", "after_commit": "2e2a720766886190a6d35c116794693aabd332b6", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-23111
csa159
csa159/pair_148834
CSA
c/c++
torvalds_linux
pair_148834
csa159/tasks/pair_148834
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 729a92781a1a..be92750e2af3 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -5914,7 +5914,7 @@ static void nft_map_catchall_activate(const struct nft_ctx *ctx, list_for_each_entry(catchall, &set->catcha...
### File: net/netfilter/nf_tables_api.c ```c static void nft_map_catchall_activate(const struct nft_ctx *ctx, struct nft_set *set) { u8 genmask = nft_genmask_next(ctx->net); struct nft_set_elem_catchall *catchall; struct nft_set_ext *ext; list_for_each_entry(catchall, &set->catchall_list, list) { ext =...
### File: net/netfilter/nf_tables_api.c ```c static void nft_map_catchall_activate(const struct nft_ctx *ctx, struct nft_set *set) { u8 genmask = nft_genmask_next(ctx->net); struct nft_set_elem_catchall *catchall; struct nft_set_ext *ext; list_for_each_entry(catchall, &set->catchall_list, list) { ext =...
{ "project_id": "torvalds_linux", "before_commit": "7d6ba706ae5ef7d3d00b67140d2873ae1da6d41f", "after_commit": "f41c5d151078c5348271ffaf8e7410d96f2d82f8", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-31747
csa159
csa159/pair_149548
CSA
c/c++
torvalds_linux
pair_149548
csa159/tasks/pair_149548
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/comedi/drivers/me4000.c b/drivers/comedi/drivers/me4000.c index 7dd3a0071863..effe9fdbbafe 100644 --- a/drivers/comedi/drivers/me4000.c +++ b/drivers/comedi/drivers/me4000.c @@ -315,6 +315,18 @@ static int me4000_xilinx_download(struct comedi_device *dev, unsigned int val; unsigned int i; + /...
### File: drivers/comedi/drivers/me4000.c ```c static int me4000_xilinx_download(struct comedi_device *dev, const u8 *data, size_t size, unsigned long context) { struct pci_dev *pcidev = comedi_to_pci_dev(dev); struct me4000_private *devpriv = dev->private; unsigned long xilinx_iobase = pci_resource_star...
### File: drivers/comedi/drivers/me4000.c ```c static int me4000_xilinx_download(struct comedi_device *dev, const u8 *data, size_t size, unsigned long context) { struct pci_dev *pcidev = comedi_to_pci_dev(dev); struct me4000_private *devpriv = dev->private; unsigned long xilinx_iobase = pci_resource_star...
{ "project_id": "torvalds_linux", "before_commit": "101ab946b79ad83b36d5cfd47de587492a80acf0", "after_commit": "3fb43a7a5b44713f892c58ead2e5f3a1bc9f4ee7", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-43054
csa159
csa159/pair_149640
CSA
c/c++
torvalds_linux
pair_149640
csa159/tasks/pair_149640
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index d668bd19fd4a..528883d989b8 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -26,6 +26,7 @@ #include <linux/slab.h> #include <linux/types.h> #include <linux/configfs.h> +#include <linu...
### File: drivers/target/loopback/tcm_loop.c ```c static int tcm_loop_device_reset(struct scsi_cmnd *sc) { struct tcm_loop_hba *tl_hba; struct tcm_loop_tpg *tl_tpg; int ret; /* * Locate the tcm_loop_hba_t pointer */ tl_hba = *(struct tcm_loop_hba **)shost_priv(sc->device->host); tl_tpg = &tl_hba->tl_hba_tpgs...
### File: drivers/target/loopback/tcm_loop.c ```c static int tcm_loop_device_reset(struct scsi_cmnd *sc) { struct tcm_loop_hba *tl_hba; struct tcm_loop_tpg *tl_tpg; int ret; /* * Locate the tcm_loop_hba_t pointer */ tl_hba = *(struct tcm_loop_hba **)shost_priv(sc->device->host); tl_tpg = &tl_hba->tl_hba_tpgs...
{ "project_id": "torvalds_linux", "before_commit": "61d099ac4a7a8fb11ebdb6e2ec8d77f38e77362f", "after_commit": "1333eee56cdf3f0cf67c6ab4114c2c9e0a952026", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-43166
csa159
csa159/pair_149751
CSA
c/c++
torvalds_linux
pair_149751
csa159/tasks/pair_149751
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c index c8d8e129eb4b..30775502b56d 100644 --- a/fs/erofs/zmap.c +++ b/fs/erofs/zmap.c @@ -513,6 +513,7 @@ static int z_erofs_map_blocks_ext(struct inode *inode, unsigned int recsz = z_erofs_extent_recsize(vi->z_advise); erofs_off_t pos = round_up(Z_EROFS_MAP_HEADER_END(e...
### File: fs/erofs/zmap.c ```c static int z_erofs_map_blocks_ext(struct inode *inode, struct erofs_map_blocks *map, int flags) { struct erofs_inode *vi = EROFS_I(inode); struct super_block *sb = inode->i_sb; bool interlaced = vi->z_advise & Z_EROFS_ADVISE_INTERLACED_PCLUSTER; unsigned int recsz = z_erofs_exte...
### File: fs/erofs/zmap.c ```c static int z_erofs_map_blocks_ext(struct inode *inode, struct erofs_map_blocks *map, int flags) { struct erofs_inode *vi = EROFS_I(inode); struct super_block *sb = inode->i_sb; bool interlaced = vi->z_advise & Z_EROFS_ADVISE_INTERLACED_PCLUSTER; unsigned int recsz = z_erofs_exte...
{ "project_id": "torvalds_linux", "before_commit": "bf4fde7db4a8e2613cba36d81ac271f3d66c28f7", "after_commit": "4a2d046e4b13202a6301a993961f5b30ae4d7119", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-43185
csa159
csa159/pair_149770
CSA
c/c++
torvalds_linux
pair_149770
csa159/tasks/pair_149770
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c index 7c53b78b818e..188572491d53 100644 --- a/fs/smb/server/transport_rdma.c +++ b/fs/smb/server/transport_rdma.c @@ -2540,9 +2540,9 @@ static int smb_direct_prepare(struct ksmbd_transport *t) goto put; req = (struct smbdirect_negotiate...
### File: fs/smb/server/transport_rdma.c ```c static int smb_direct_prepare(struct ksmbd_transport *t) { struct smb_direct_transport *st = SMBD_TRANS(t); struct smbdirect_socket *sc = &st->socket; struct smbdirect_socket_parameters *sp = &sc->parameters; struct smbdirect_recv_io *recvmsg; struct smbdirect_negotiat...
### File: fs/smb/server/transport_rdma.c ```c static int smb_direct_prepare(struct ksmbd_transport *t) { struct smb_direct_transport *st = SMBD_TRANS(t); struct smbdirect_socket *sc = &st->socket; struct smbdirect_socket_parameters *sp = &sc->parameters; struct smbdirect_recv_io *recvmsg; struct smbdirect_negotiat...
{ "project_id": "torvalds_linux", "before_commit": "c5794709bc9105935dbedef8b9cf9c06f2b559fa", "after_commit": "6b4f875aac344cdd52a1f34cc70ed2f874a65757", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-45863
csa159
csa159/pair_150111
CSA
c/c++
torvalds_linux
pair_150111
csa159/tasks/pair_150111
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index e9b2c23ed171..cfc15aaf8c7b 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1106,6 +1106,7 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev, dev_err(master->dev, "<...
### File: drivers/i3c/master/dw-i3c-master.c ```c static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev, struct i2c_msg *i2c_xfers, int i2c_nxfers) { struct dw_i3c_i2c_dev_data *data = i2c_dev_get_master_data(dev); struct i3c_master_controller *m = i2c_dev_get_master(dev); struct dw_i3c_master *m...
### File: drivers/i3c/master/dw-i3c-master.c ```c static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev, struct i2c_msg *i2c_xfers, int i2c_nxfers) { struct dw_i3c_i2c_dev_data *data = i2c_dev_get_master_data(dev); struct i3c_master_controller *m = i2c_dev_get_master(dev); struct dw_i3c_master *m...
{ "project_id": "torvalds_linux", "before_commit": "4280197d154cae1d1d5acb54484da26da04eac32", "after_commit": "2537089413514caaa9a5fdeeac3a34d45100f747", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-46001
csa159
csa159/pair_150247
CSA
c/c++
torvalds_linux
pair_150247
csa159/tasks/pair_150247
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/hwmon/pt5161l.c b/drivers/hwmon/pt5161l.c index 20e3cfa625f1..89d4da8aa4c0 100644 --- a/drivers/hwmon/pt5161l.c +++ b/drivers/hwmon/pt5161l.c @@ -121,7 +121,7 @@ static int pt5161l_read_block_data(struct pt5161l_data *data, u32 address, int ret, tries; u8 remain_len = len; u8 curr_len; - u8 w...
### File: drivers/hwmon/pt5161l.c ```c static int pt5161l_read_block_data(struct pt5161l_data *data, u32 address, u8 len, u8 *val) { struct i2c_client *client = data->client; int ret, tries; u8 remain_len = len; u8 curr_len; u8 wbuf[16], rbuf[24]; u8 cmd = 0x08; /* [7]:pec_en, [4:2]:func, [1]:start, [0]:en...
### File: drivers/hwmon/pt5161l.c ```c static int pt5161l_read_block_data(struct pt5161l_data *data, u32 address, u8 len, u8 *val) { struct i2c_client *client = data->client; int ret, tries; u8 remain_len = len; u8 curr_len; u8 wbuf[16], rbuf[I2C_SMBUS_BLOCK_MAX]; u8 cmd = 0x08; /* [7]:pec_en, [4:2]:func, ...
{ "project_id": "torvalds_linux", "before_commit": "b66437cb20a2d9ef201f40b675569f8ea7787c9f", "after_commit": "24c73e93d6a756e1b8626bb259d2e07c5b89b370", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-46180
csa159
csa159/pair_150426
CSA
c/c++
torvalds_linux
pair_150426
csa159/tasks/pair_150426
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 30f6fcb68632..8fb595733b9c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -2476,8 +2476,9 @@ static ...
### File: drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ```c static void brcmf_sdio_bus_stop(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; struct brcmf_sdio *bus = sdiodev->bus; struct brcmf_core *core = bus->sdio_core; u32 ...
### File: drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ```c static void brcmf_sdio_bus_stop(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio; struct brcmf_sdio *bus = sdiodev->bus; struct brcmf_core *core = bus->sdio_core; u32 ...
{ "project_id": "torvalds_linux", "before_commit": "711a9c018ad252b2807f85d44e1267b595644f9b", "after_commit": "c623b63580880cc742255eaed3d79804c1b91143", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-48730
csa159
csa159/pair_156745
CSA
c/c++
torvalds_linux
pair_156745
csa159/tasks/pair_156745
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c index 56bf5ad01ad5..8f5848aa144f 100644 --- a/drivers/dma-buf/dma-heap.c +++ b/drivers/dma-buf/dma-heap.c @@ -14,6 +14,7 @@ #include <linux/xarray.h> #include <linux/list.h> #include <linux/slab.h> +#include <linux/nospec.h> #include <linux/uacces...
### File: drivers/dma-buf/dma-heap.c ```c static long dma_heap_ioctl(struct file *file, unsigned int ucmd, unsigned long arg) { char stack_kdata[128]; char *kdata = stack_kdata; unsigned int kcmd; unsigned int in_size, out_size, drv_size, ksize; int nr = _IOC_NR(ucmd); int ret = 0; if (nr >= ARRAY_SIZE(dm...
### File: drivers/dma-buf/dma-heap.c ```c static long dma_heap_ioctl(struct file *file, unsigned int ucmd, unsigned long arg) { char stack_kdata[128]; char *kdata = stack_kdata; unsigned int kcmd; unsigned int in_size, out_size, drv_size, ksize; int nr = _IOC_NR(ucmd); int ret = 0; if (nr >= ARRAY_SIZE(dm...
{ "project_id": "torvalds_linux", "before_commit": "1b777d4d9e383d2744fc9b3a09af6ec1893c8b1a", "after_commit": "92c4cfaee6872038563c5b6f2e8e613f9d84d47d", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2021-42252
csa159
csa159/pair_157090
CSA
c/c++
torvalds_linux
pair_157090
csa159/tasks/pair_157090
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c index c557ffd0992c..55e46fa6cf42 100644 --- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c +++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c @@ -51,7 +51,7 @@ static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) unsign...
### File: drivers/soc/aspeed/aspeed-lpc-ctrl.c ```c static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vsize > lpc_c...
### File: drivers/soc/aspeed/aspeed-lpc-ctrl.c ```c static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vma_pages(vma...
{ "project_id": "torvalds_linux", "before_commit": "2734d6c1b1a089fb593ef6a23d4b70903526fe0c", "after_commit": "b49a0e69a7b1a68c8d3f64097d06dabb770fec96", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-50010
csa159
csa159/pair_157305
CSA
c/c++
torvalds_linux
pair_157305
csa159/tasks/pair_157305
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c index 09dd85553d4f..7f09a0daaaa2 100644 --- a/drivers/video/fbdev/i740fb.c +++ b/drivers/video/fbdev/i740fb.c @@ -400,7 +400,7 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var, u32 xres, right, hslen, left, xtotal; u32 yres,...
### File: drivers/video/fbdev/i740fb.c ```c static int i740fb_decode_var(const struct fb_var_screeninfo *var, struct i740fb_par *par, struct fb_info *info) { /* * Get the video params out of 'var'. * If a value doesn't fit, round it up, if it's too big, return -EINVAL. */ u32 xres, right, hslen, left, ...
### File: drivers/video/fbdev/i740fb.c ```c static int i740fb_decode_var(const struct fb_var_screeninfo *var, struct i740fb_par *par, struct fb_info *info) { /* * Get the video params out of 'var'. * If a value doesn't fit, round it up, if it's too big, return -EINVAL. */ u32 xres, right, hslen, left, ...
{ "project_id": "torvalds_linux", "before_commit": "2f1c4523f7a3aaabe7e53d3ebd378292947e95c8", "after_commit": "40bf722f8064f50200b8c4f8946cd625b441dda9", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-38692
csa159
csa159/pair_157307
CSA
c/c++
torvalds_linux
pair_157307
csa159/tasks/pair_157307
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 3103b932b674..ee060e26f51d 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -996,6 +996,7 @@ int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei, struct exfat_hint_femp candi_empty; struct exfat_sb_info *sbi = EXFAT_SB(sb); int num_ent...
### File: fs/exfat/dir.c ```c int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei, struct exfat_chain *p_dir, struct exfat_uni_name *p_uniname, struct exfat_hint *hint_opt) { int i, rewind = 0, dentry = 0, end_eidx = 0, num_ext = 0, len; int order, step, name_len = 0; int dentries_per_cl...
### File: fs/exfat/dir.c ```c int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei, struct exfat_chain *p_dir, struct exfat_uni_name *p_uniname, struct exfat_hint *hint_opt) { int i, rewind = 0, dentry = 0, end_eidx = 0, num_ext = 0, len; int order, step, name_len = 0; int dentries_per_cl...
{ "project_id": "torvalds_linux", "before_commit": "2f2d42a17b5a6711378d39df74f1f69a831c5d4e", "after_commit": "99f9a97dce39ad413c39b92c90393bbd6778f3fd", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-48634
csa159
csa159/pair_158826
CSA
c/c++
torvalds_linux
pair_158826
csa159/tasks/pair_158826
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index bd40c040a2c9..2f52eceda3a1 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c @@ -532,15 +532,18 @@ int gma_crtc_page_flip(struct drm_crtc *crtc, WARN_ON(drm_crtc_vblank_get(crtc) ...
### File: drivers/gpu/drm/gma500/gma_display.c ```c int gma_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event, uint32_t page_flip_flags, struct drm_modeset_acquire_ctx *ctx) { struct gma_crtc *gma_crtc = to_gma_crtc(crtc); stru...
### File: drivers/gpu/drm/gma500/gma_display.c ```c int gma_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event, uint32_t page_flip_flags, struct drm_modeset_acquire_ctx *ctx) { struct gma_crtc *gma_crtc = to_gma_crtc(crtc); stru...
{ "project_id": "torvalds_linux", "before_commit": "6463d3930ba5b6addcfc8f80a4543976a2fc7656", "after_commit": "63e37a79f7bd939314997e29c2f5a9f0ef184281", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2021-47437
csa159
csa159/pair_159680
CSA
c/c++
torvalds_linux
pair_159680
csa159/tasks/pair_159680
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c index eb48102f9424..287fff39a927 100644 --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -353,10 +353,11 @@ static int adis16475_set_freq(struct adis16475 *st, const u32 freq) if (dec > st->info->max_dec) dec = st->info->m...
### File: drivers/iio/imu/adis16475.c ```c static int adis16475_set_freq(struct adis16475 *st, const u32 freq) { u16 dec; int ret; u32 sample_rate = st->clk_freq; if (!freq) return -EINVAL; adis_dev_lock(&st->adis); /* * When using sync scaled mode, the input clock needs to be scaled so that we have * an ...
### File: drivers/iio/imu/adis16475.c ```c static int adis16475_set_freq(struct adis16475 *st, const u32 freq) { u16 dec; int ret; u32 sample_rate = st->clk_freq; if (!freq) return -EINVAL; adis_dev_lock(&st->adis); /* * When using sync scaled mode, the input clock needs to be scaled so that we have * an ...
{ "project_id": "torvalds_linux", "before_commit": "8167c9a375ccceed19048ad9d68cb2d02ed276e0", "after_commit": "9da1b86865ab4376408c58cd9fec332c8bdb5c73", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2024-26811
csa159
csa159/pair_161551
CSA
c/c++
torvalds_linux
pair_161551
csa159/tasks/pair_161551
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/smb/server/ksmbd_netlink.h b/fs/smb/server/ksmbd_netlink.h index 8ca8a45c4c62..686b321c5a8b 100644 --- a/fs/smb/server/ksmbd_netlink.h +++ b/fs/smb/server/ksmbd_netlink.h @@ -167,7 +167,8 @@ struct ksmbd_share_config_response { __u16 force_uid; __u16 force_gid; __s8 share_name[KSMBD_REQ_MAX_SHARE_...
### File: fs/smb/server/mgmt/share_config.c ```c static struct ksmbd_share_config *share_config_request(struct unicode_map *um, const char *name) { struct ksmbd_share_config_response *resp; struct ksmbd_share_config *share = NULL; struct ksmbd_share_config *lookup; int ret; resp = ksmbd_ipc_share_con...
### File: fs/smb/server/mgmt/share_config.c ```c static struct ksmbd_share_config *share_config_request(struct unicode_map *um, const char *name) { struct ksmbd_share_config_response *resp; struct ksmbd_share_config *share = NULL; struct ksmbd_share_config *lookup; int ret; resp = ksmbd_ipc_share_con...
{ "project_id": "torvalds_linux", "before_commit": "c1832f67035dc04fb89e6b591b64e4d515843cda", "after_commit": "a677ebd8ca2f2632ccdecbad7b87641274e15aac", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2026-23299
csa159
csa159/pair_161587
CSA
c/c++
torvalds_linux
pair_161587
csa159/tasks/pair_161587
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 4e7bf63af9c5..0290dea081f6 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -2166,6 +2166,7 @@ static void hci_sock_destruct(struct sock *sk) mgmt_cleanup(sk); skb_queue_purge(&sk->sk_receive_queue); skb_queue_purge(&sk-...
### File: net/bluetooth/hci_sock.c ```c static void hci_sock_destruct(struct sock *sk) { mgmt_cleanup(sk); skb_queue_purge(&sk->sk_receive_queue); skb_queue_purge(&sk->sk_write_queue); } ``` ### File: net/bluetooth/iso.c ```c static void iso_sock_destruct(struct sock *sk) { BT_DBG("sk %p", sk); iso_conn_put(iso_...
### File: net/bluetooth/hci_sock.c ```c static void hci_sock_destruct(struct sock *sk) { mgmt_cleanup(sk); skb_queue_purge(&sk->sk_receive_queue); skb_queue_purge(&sk->sk_write_queue); skb_queue_purge(&sk->sk_error_queue); } ``` ### File: net/bluetooth/iso.c ```c static void iso_sock_destruct(struct sock *sk) { B...
{ "project_id": "torvalds_linux", "before_commit": "c28d2bff70444a85b3b86aaf241ece9408c7858c", "after_commit": "21e4271e65094172aadd5beb8caea95dd0fbf6d7", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2020-28374
csa159
csa159/pair_162518
CSA
c/c++
torvalds_linux
pair_162518
csa159/tasks/pair_162518
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c index 44e15d7fb2f0..66d6f1d06f21 100644 --- a/drivers/target/target_core_xcopy.c +++ b/drivers/target/target_core_xcopy.c @@ -46,60 +46,83 @@ static int target_xcopy_gen_naa_ieee(struct se_device *dev, unsigned char *buf) return 0; ...
### File: drivers/target/target_core_xcopy.c ```c static int target_xcopy_gen_naa_ieee(struct se_device *dev, unsigned char *buf) { int off = 0; buf[off++] = (0x6 << 4); buf[off++] = 0x01; buf[off++] = 0x40; buf[off] = (0x5 << 4); spc_parse_naa_6h_vendor_specific(dev, &buf[off]); return 0; } static int target...
### File: drivers/target/target_core_xcopy.c ```c static int target_xcopy_gen_naa_ieee(struct se_device *dev, unsigned char *buf) { int off = 0; buf[off++] = (0x6 << 4); buf[off++] = 0x01; buf[off++] = 0x40; buf[off] = (0x5 << 4); spc_parse_naa_6h_vendor_specific(dev, &buf[off]); return 0; } static int target...
{ "project_id": "torvalds_linux", "before_commit": "e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62", "after_commit": "2896c93811e39d63a4d9b63ccf12a8fbc226e5e4", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2024-26954
csa159
csa159/pair_162526
CSA
c/c++
torvalds_linux
pair_162526
csa159/tasks/pair_162526
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/smb/server/smb2misc.c b/fs/smb/server/smb2misc.c index 03dded29a980..7c872ffb4b0a 100644 --- a/fs/smb/server/smb2misc.c +++ b/fs/smb/server/smb2misc.c @@ -107,7 +107,10 @@ static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, case SMB2_CREATE: { unsigned short int name_off = - ...
### File: fs/smb/server/smb2misc.c ```c static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) { int ret = 0; *off = 0; *len = 0; /* * Following commands have data areas so we have to get the location * of the data buffer offset and data buffer length for the parti...
### File: fs/smb/server/smb2misc.c ```c static int smb2_get_data_area_len(unsigned int *off, unsigned int *len, struct smb2_hdr *hdr) { int ret = 0; *off = 0; *len = 0; /* * Following commands have data areas so we have to get the location * of the data buffer offset and data buffer length for the parti...
{ "project_id": "torvalds_linux", "before_commit": "e758fa6956cbc873e4819ec3dd97cfd05a4c147e", "after_commit": "a80a486d72e20bd12c335bcd38b6e6f19356b0aa", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2023-53166
csa159
csa159/pair_162993
CSA
c/c++
torvalds_linux
pair_162993
csa159/tasks/pair_162993
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/drivers/power/supply/bq25890_charger.c b/drivers/power/supply/bq25890_charger.c index 22cde35eb144..557ba532d31a 100644 --- a/drivers/power/supply/bq25890_charger.c +++ b/drivers/power/supply/bq25890_charger.c @@ -750,7 +750,7 @@ static void bq25890_charger_external_power_changed(struct power_supply *psy) ...
### File: drivers/power/supply/bq25890_charger.c ```c static void bq25890_charger_external_power_changed(struct power_supply *psy) { struct bq25890_device *bq = power_supply_get_drvdata(psy); union power_supply_propval val; int input_current_limit, ret; if (bq->chip_version != BQ25892) return; ret = power_supp...
### File: drivers/power/supply/bq25890_charger.c ```c static void bq25890_charger_external_power_changed(struct power_supply *psy) { struct bq25890_device *bq = power_supply_get_drvdata(psy); union power_supply_propval val; int input_current_limit, ret; if (bq->chip_version != BQ25892) return; ret = power_supp...
{ "project_id": "torvalds_linux", "before_commit": "f8319774d6f1567d6e7d03653174ab0c82c5c66d", "after_commit": "029a443b9b6424170f00f6dd5b7682e682cce92e", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2022-49639
csa159
csa159/pair_163682
CSA
c/c++
torvalds_linux
pair_163682
csa159/tasks/pair_163682
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst index 9f41961d11d5..0e58001f8580 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -1085,7 +1085,7 @@ cipso_cache_enable - BOOLEAN cipso_cache_bucket_size - INTEGER The CIPSO...
### File: net/ipv4/cipso_ipv4.c ```c static int cipso_v4_cache_check(const unsigned char *key, u32 key_len, struct netlbl_lsm_secattr *secattr) { u32 bkt; struct cipso_v4_map_cache_entry *entry; struct cipso_v4_map_cache_entry *prev_entry = NULL; u32 hash; if (!cipso_v4_cache_enabled) return -ENOENT; ...
### File: net/ipv4/cipso_ipv4.c ```c static int cipso_v4_cache_check(const unsigned char *key, u32 key_len, struct netlbl_lsm_secattr *secattr) { u32 bkt; struct cipso_v4_map_cache_entry *entry; struct cipso_v4_map_cache_entry *prev_entry = NULL; u32 hash; if (!READ_ONCE(cipso_v4_cache_enabled)) return ...
{ "project_id": "torvalds_linux", "before_commit": "310731e2f1611d1d13aae237abcf8e66d33345d5", "after_commit": "dd44f04b9214adb68ef5684ae87a81ba03632250", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2024-38384
csa159
csa159/pair_164279
CSA
c/c++
torvalds_linux
pair_164279
csa159/tasks/pair_164279
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 8699f193cf31..52367a4501d0 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1035,6 +1035,16 @@ static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu) struct blkg_iostat cur; unsigned int seq; + /* + * Order assignment of `next_bisc...
### File: block/blk-cgroup.c ```c static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu) { struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu); struct llist_node *lnode; struct blkg_iostat_set *bisc, *next_bisc; unsigned long flags; rcu_read_lock(); lnode = llist_del_all(lhead); if (!lnode) goto...
### File: block/blk-cgroup.c ```c static void __blkcg_rstat_flush(struct blkcg *blkcg, int cpu) { struct llist_head *lhead = per_cpu_ptr(blkcg->lhead, cpu); struct llist_node *lnode; struct blkg_iostat_set *bisc, *next_bisc; unsigned long flags; rcu_read_lock(); lnode = llist_del_all(lhead); if (!lnode) goto...
{ "project_id": "torvalds_linux", "before_commit": "6da6680632792709cecf2b006f2fe3ca7857e791", "after_commit": "d0aac2363549e12cc79b8e285f13d5a9f42fd08e", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-21719
csa159
csa159/pair_164760
CSA
c/c++
torvalds_linux
pair_164760
csa159/tasks/pair_164760
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/net/ipv4/ipmr_base.c b/net/ipv4/ipmr_base.c index 03b6eee407a2..28d77d454d44 100644 --- a/net/ipv4/ipmr_base.c +++ b/net/ipv4/ipmr_base.c @@ -330,9 +330,6 @@ int mr_table_dump(struct mr_table *mrt, struct sk_buff *skb, list_for_each_entry(mfc, &mrt->mfc_unres_queue, list) { if (e < s_e) goto next_...
### File: net/ipv4/ipmr_base.c ```c int mr_table_dump(struct mr_table *mrt, struct sk_buff *skb, struct netlink_callback *cb, int (*fill)(struct mr_table *mrt, struct sk_buff *skb, u32 portid, u32 seq, struct mr_mfc *c, int cmd, int flags), spinlock_t *lock, struct fib_dump_filter *filter)...
### File: net/ipv4/ipmr_base.c ```c int mr_table_dump(struct mr_table *mrt, struct sk_buff *skb, struct netlink_callback *cb, int (*fill)(struct mr_table *mrt, struct sk_buff *skb, u32 portid, u32 seq, struct mr_mfc *c, int cmd, int flags), spinlock_t *lock, struct fib_dump_filter *filter)...
{ "project_id": "torvalds_linux", "before_commit": "965adae5a33a998e2b62ec1b37c5eb21f1875b15", "after_commit": "15a901361ec3fb1c393f91880e1cbf24ec0a88bd", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2025-37780
csa159
csa159/pair_165550
CSA
c/c++
torvalds_linux
pair_165550
csa159/tasks/pair_165550
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/fs/isofs/export.c b/fs/isofs/export.c index 35768a63fb1d..421d247fae52 100644 --- a/fs/isofs/export.c +++ b/fs/isofs/export.c @@ -180,7 +180,7 @@ static struct dentry *isofs_fh_to_parent(struct super_block *sb, return NULL; return isofs_export_iget(sb, - fh_len > 2 ? ifid->parent_block : 0, + fh...
### File: fs/isofs/export.c ```c static struct dentry *isofs_fh_to_parent(struct super_block *sb, struct fid *fid, int fh_len, int fh_type) { struct isofs_fid *ifid = (struct isofs_fid *)fid; if (fh_len < 2 || fh_type != 2) return NULL; return isofs_export_iget(sb, fh_len > 2 ? ifid->parent_block : 0, if...
### File: fs/isofs/export.c ```c static struct dentry *isofs_fh_to_parent(struct super_block *sb, struct fid *fid, int fh_len, int fh_type) { struct isofs_fid *ifid = (struct isofs_fid *)fid; if (fh_len < 2 || fh_type != 2) return NULL; return isofs_export_iget(sb, fh_len > 3 ? ifid->parent_block : 0, if...
{ "project_id": "torvalds_linux", "before_commit": "e48e99b6edf41c69c5528aa7ffb2daf3c59ee105", "after_commit": "0405d4b63d082861f4eaff9d39c78ee9dc34f845", "repo_path": "/workspace/repo/torvalds/linux", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/to...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2019-11338
csa159
csa159/pair_17613
CSA
c/c++
FFmpeg_FFmpeg
pair_17613
csa159/tasks/pair_17613
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 734c42037a..2412bd0a97 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -472,6 +472,11 @@ static int hls_slice_header(HEVCContext *s) // Coded parameters sh->first_slice_in_pic_flag = get_bits1(gb); + if (s->ref && sh->first_sl...
### File: libavcodec/hevcdec.c ```c static int hls_slice_header(HEVCContext *s) { GetBitContext *gb = &s->HEVClc->gb; SliceHeader *sh = &s->sh; int i, ret; // Coded parameters sh->first_slice_in_pic_flag = get_bits1(gb); if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) { s...
### File: libavcodec/hevcdec.c ```c static int hls_slice_header(HEVCContext *s) { GetBitContext *gb = &s->HEVClc->gb; SliceHeader *sh = &s->sh; int i, ret; // Coded parameters sh->first_slice_in_pic_flag = get_bits1(gb); if (s->ref && sh->first_slice_in_pic_flag) { av_log(s->avctx, AV...
{ "project_id": "FFmpeg_FFmpeg", "before_commit": "d31940f04e864542819fb6b998d796e14305bd3c", "after_commit": "9ccc633068c6fe76989f487c8932bd11886ad65b", "repo_path": "/workspace/repo/FFmpeg/FFmpeg", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/FFmp...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2023-39562
csa159
csa159/pair_4253
CSA
c/c++
gpac_gpac
pair_4253
csa159/tasks/pair_4253
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/isomedia/box_funcs.c b/src/isomedia/box_funcs.c index d3791dde5..02643a306 100644 --- a/src/isomedia/box_funcs.c +++ b/src/isomedia/box_funcs.c @@ -99,6 +99,7 @@ GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type, char uuid[16]; GF_Err e; GF_BitStream *uncomp_bs = NULL...
### File: src/isomedia/box_funcs.c ```c GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type, Bool is_root_box, u64 parent_size) { u32 type, uuid_type, hdr_size, restore_type; u64 size, start, comp_start, end; char uuid[16]; GF_Err e; GF_BitStream *uncomp_bs = NULL; u8 *uncomp_data = NUL...
### File: src/isomedia/box_funcs.c ```c GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type, Bool is_root_box, u64 parent_size) { u32 type, uuid_type, hdr_size, restore_type; u64 size, start, comp_start, end; char uuid[16]; GF_Err e; GF_BitStream *uncomp_bs = NULL; GF_BitStream *orig_bs...
{ "project_id": "gpac_gpac", "before_commit": "a97e5e8625e46eedd2512cc74727d662c9204e0e", "after_commit": "9024531ee8e6ae8318a8fe0cbb64710d1acc31f6", "repo_path": "/workspace/repo/gpac/gpac", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/gpac_gpac/04...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2017-7866
csa159
csa159/pair_4869
CSA
c/c++
FFmpeg_FFmpeg
pair_4869
csa159/tasks/pair_4869
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 2f8d266c27..50a0a296b3 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -437,13 +437,13 @@ static int decode_zbuf(AVBPrint *bp, const uint8_t *data, av_bprint_init(bp, 0, -1); while (zstream.avail_in > 0) { - av_bprint_get_buff...
### File: libavcodec/pngdec.c ```c static int decode_zbuf(AVBPrint *bp, const uint8_t *data, const uint8_t *data_end) { z_stream zstream; unsigned char *buf; unsigned buf_size; int ret; zstream.zalloc = ff_png_zalloc; zstream.zfree = ff_png_zfree; zstream.opaque = NU...
### File: libavcodec/pngdec.c ```c static int decode_zbuf(AVBPrint *bp, const uint8_t *data, const uint8_t *data_end) { z_stream zstream; unsigned char *buf; unsigned buf_size; int ret; zstream.zalloc = ff_png_zalloc; zstream.zfree = ff_png_zfree; zstream.opaque = NU...
{ "project_id": "FFmpeg_FFmpeg", "before_commit": "a0341b4d74f4db289e15dac0d2988eaa2d18a1bb", "after_commit": "e371f031b942d73e02c090170975561fabd5c264", "repo_path": "/workspace/repo/FFmpeg/FFmpeg", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/FFmp...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2020-9365
csa159
csa159/pair_134943
CSA
c/c++
jedisct1_pure-ftpd
pair_134943
csa159/tasks/pair_134943
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/utils.c b/src/utils.c index f41492d..5e88104 100644 --- a/src/utils.c +++ b/src/utils.c @@ -45,5 +45,9 @@ int pure_memcmp(const void * const b1_, const void * const b2_, size_t len) int pure_strcmp(const char * const s1, const char * const s2) { - return pure_memcmp(s1, s2, strlen(s1) + 1U); + ...
### File: src/utils.c ```c for (i = 0U; i < len; i++) { d |= b1[i] ^ b2[i]; } return (int) ((1 & ((d - 1) >> 8)) - 1); } #endif int pure_strcmp(const char * const s1, const char * const s2) { return pure_memcmp(s1, s2, strlen(s1) + 1U); } #endif int pure_strcmp(const char * const s1, const c...
### File: src/utils.c ```c int pure_strcmp(const char * const s1, const char * const s2) { const size_t s1_len = strlen(s1); const size_t s2_len = strlen(s2); const size_t len = (s1_len < s2_len) ? s1_len : s2_len; return pure_memcmp(s1, s2, len + 1); } ```
{ "project_id": "jedisct1_pure-ftpd", "before_commit": "9a8d379512dd7af25965746d65f5d187c9cbda4c", "after_commit": "bf6fcd4935e95128cf22af5924cdc8fe5c0579da", "repo_path": "/workspace/repo/jedisct1/pure-ftpd", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snap...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2016-5824
csa159
csa159/pair_135175
CSA
c/c++
libical_libical
pair_135175
csa159/tasks/pair_135175
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/libical/icalparser.c b/src/libical/icalparser.c index 2735c9ac..36778909 100644 --- a/src/libical/icalparser.c +++ b/src/libical/icalparser.c @@ -713,12 +713,6 @@ icalcomponent *icalparser_add_line(icalparser *parser, char *line) comp_kind = icalenum_string_to_component_kind(str); - ...
### File: src/libical/icalparser.c ```c icalcomponent *icalparser_add_line(icalparser *parser, char *line) { char *str; char *end; int vcount = 0; icalproperty *prop; icalproperty_kind prop_kind; icalvalue *value; icalvalue_kind value_kind = ICAL_NO_VALUE; icalerror_check_arg_rz((parser...
### File: src/libical/icalparser.c ```c icalcomponent *icalparser_add_line(icalparser *parser, char *line) { char *str; char *end; int vcount = 0; icalproperty *prop; icalproperty_kind prop_kind; icalvalue *value; icalvalue_kind value_kind = ICAL_NO_VALUE; icalerror_check_arg_rz((parser...
{ "project_id": "libical_libical", "before_commit": "04d84749e53db08c71ed0ce8b6ba5c11082743cd", "after_commit": "830d9530817516377c2bc3b532798ce2c6b4765a", "repo_path": "/workspace/repo/libical/libical", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2020-26148
csa159
csa159/pair_135384
CSA
c/c++
mity_md4c
pair_135384
csa159/tasks/pair_135384
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5176d97..d7967d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ # MD4C Change Log +## Next Version (Work in Progress) + +Fixes: + +* [#130](https://github.com/mity/md4c/issues/130): + Fix `ISANYOF` macro, which could provide unexpected results when enc...
### File: src/md4c.c ```c /* * MD4C: Markdown parser for C * (http://github.com/mity/md4c) * * Copyright (c) 2016-2020 Martin Mitas * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software w...
### File: src/md4c.c ```c /* * MD4C: Markdown parser for C * (http://github.com/mity/md4c) * * Copyright (c) 2016-2020 Martin Mitas * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software w...
{ "project_id": "mity_md4c", "before_commit": "bcdbd126a5c099981b6d637b09d376dc22fa0f46", "after_commit": "22ca89a3008966c4316d6b0a158b1a49f9038df0", "repo_path": "/workspace/repo/mity/md4c", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/mity_md4c/db...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2018-1000091
csa159
csa159/pair_135405
CSA
c/c++
mwarning_KadNode
pair_135405
csa159/tasks/pair_135405
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/ext-cmd.c b/src/ext-cmd.c index c14b18b..1b5495f 100644 --- a/src/ext-cmd.c +++ b/src/ext-cmd.c @@ -335,6 +335,33 @@ static int select_read(int sockfd, char buffer[], int bufsize, struct timeval *t } #endif +static int append_strings(char buf[], size_t bufsize, int argc, char *argv[]) +{ + int i; +...
### File: src/ext-cmd.c ```c static int select_read(int sockfd, char buffer[], int bufsize, struct timeval *tv) { fd_set rfds; int retval; FD_ZERO(&rfds); FD_SET(sockfd, &rfds); retval = select(sockfd + 1, &rfds, NULL, NULL, tv); if (retval == -1) { // Error return -1; } else if (retval) { // Data avail...
### File: src/ext-cmd.c ```c static int select_read(int sockfd, char buffer[], int bufsize, struct timeval *tv) { fd_set rfds; int retval; FD_ZERO(&rfds); FD_SET(sockfd, &rfds); retval = select(sockfd + 1, &rfds, NULL, NULL, tv); if (retval == -1) { // Error return -1; } else if (retval) { // Data avail...
{ "project_id": "mwarning_KadNode", "before_commit": "d52f6f543faa5304f23d2275bf248cd62b39322a", "after_commit": "91b38304755310458e01243214d8fbe792ba887d", "repo_path": "/workspace/repo/mwarning/KadNode", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshot...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2021-33930
csa159
csa159/pair_135446
CSA
c/c++
openSUSE_libsolv
pair_135446
csa159/tasks/pair_135446
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/ext/testcase.c b/ext/testcase.c index 0be7a213..8fb6d793 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -1991,6 +1991,7 @@ testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **res Id *genid = 0; int ngenid = 0; Queue autoinstq; + int oldjobsize = job ? job->count : 0;...
### File: ext/testcase.c ```c Solver * testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **resultp, int *resultflagsp) { Solver *solv; char *buf, *bufp; int bufl; char *testcasedir, *s; int l; char **pieces = 0; int npieces = 0; int prepared = 0; int closefp = !fp; int poolf...
### File: ext/testcase.c ```c Solver * testcase_read(Pool *pool, FILE *fp, const char *testcase, Queue *job, char **resultp, int *resultflagsp) { Solver *solv; char *buf, *bufp; int bufl; char *testcasedir, *s; int l; char **pieces = 0; int npieces = 0; int prepared = 0; int closefp = !fp; int poolf...
{ "project_id": "openSUSE_libsolv", "before_commit": "926244b99d3261b3f60bd974612999a9c781a7ab", "after_commit": "0077ef29eb46d2e1df2f230fc95a1d9748d49dec", "repo_path": "/workspace/repo/openSUSE/libsolv", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshot...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2018-19826
csa159
csa159/pair_135624
CSA
c/c++
sass_libsass
pair_135624
csa159/tasks/pair_135624
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/parser.cpp b/src/parser.cpp index 374ffa13..516d593d 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1918,7 +1918,7 @@ namespace Sass { String_Obj Parser::parse_ie_keyword_arg() { - String_Schema_Ptr kwd_arg = SASS_MEMORY_NEW(String_Schema, pstate, 3); + String_Schema_Obj kwd_arg = S...
### File: src/parser.cpp ```c String_Obj Parser::parse_ie_property() { lex< ie_property >(); Token str(lexed); const char* i = str.begin; // see if there any interpolants const char* p = find_first_in_interval< exactly<hash_lbrace>, block_comment >(str.begin, str.end); if (!p) { return S...
### File: src/parser.cpp ```c String_Obj Parser::parse_ie_property() { lex< ie_property >(); Token str(lexed); const char* i = str.begin; // see if there any interpolants const char* p = find_first_in_interval< exactly<hash_lbrace>, block_comment >(str.begin, str.end); if (!p) { return S...
{ "project_id": "sass_libsass", "before_commit": "c93f0581c6b7794d8c1d5637c5c4dabd591b1d57", "after_commit": "eb15533b07773c30dc03c9d742865604f47120ef", "repo_path": "/workspace/repo/sass/libsass", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/sass_l...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2017-6309
csa159
csa159/pair_135749
CSA
c/c++
verdammelt_tnef
pair_135749
csa159/tasks/pair_135749
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/src/file.c b/src/file.c index 4dacda4..4b3d81d 100644 --- a/src/file.c +++ b/src/file.c @@ -173,11 +173,13 @@ file_add_mapi_attrs (File* file, MAPI_Attr** attrs) switch (a->name) { case MAPI_ATTACH_LONG_FILENAME: + assert(a->type == szMAPI_STRING); if (file->name) XFREE(file->name); ...
### File: src/file.c ```c static void file_add_mapi_attrs (File* file, MAPI_Attr** attrs) { int i; for (i = 0; attrs[i]; i++) { MAPI_Attr* a = attrs[i]; if (a->num_values) { switch (a->name) { case MAPI_ATTACH_LONG_FILENAME: if (file->name) XFREE(file->name); file->name = strdup( (ch...
### File: src/file.c ```c static void file_add_mapi_attrs (File* file, MAPI_Attr** attrs) { int i; for (i = 0; attrs[i]; i++) { MAPI_Attr* a = attrs[i]; if (a->num_values) { switch (a->name) { case MAPI_ATTACH_LONG_FILENAME: assert(a->type == szMAPI_STRING); if (file->name) XFREE(fil...
{ "project_id": "verdammelt_tnef", "before_commit": "c5044689e50039635e7700fe2472fd632ac77176", "after_commit": "8dccf79857ceeb7a6d3e42c1e762e7b865d5344d", "repo_path": "/workspace/repo/verdammelt/tnef", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2020-11764
csa159
csa159/pair_136251
CSA
c/c++
openexr_openexr
pair_136251
csa159/tasks/pair_136251
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp b/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp index 7e0dac09..fac7fc43 100644 --- a/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp +++ b/OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp @@ -44,6 +44,7 @@ #include <Iex.h> #include <vector> +#include <stddef.h> OPENEX...
### File: OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp ```c void CompositeDeepScanLine::Data::handleDeepFrameBuffer (DeepFrameBuffer& buf, std::vector< unsigned int > & counts, vector< std::vector< float* > > & point...
### File: OpenEXR/IlmImf/ImfCompositeDeepScanLine.cpp ```c void CompositeDeepScanLine::Data::handleDeepFrameBuffer (DeepFrameBuffer& buf, std::vector< unsigned int > & counts, vector< std::vector< float* > > & point...
{ "project_id": "openexr_openexr", "before_commit": "031199cd4fc062dd7bfe902c6552cf22f6bfbbdb", "after_commit": "e79d2296496a50826a15c667bf92bdc5a05518b4", "repo_path": "/workspace/repo/openexr/openexr", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2020-11764
csa159
csa159/pair_136252
CSA
c/c++
openexr_openexr
pair_136252
csa159/tasks/pair_136252
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/OpenEXR/IlmImf/ImfHeader.cpp b/OpenEXR/IlmImf/ImfHeader.cpp index e29ec421..f3655e3f 100644 --- a/OpenEXR/IlmImf/ImfHeader.cpp +++ b/OpenEXR/IlmImf/ImfHeader.cpp @@ -902,7 +902,7 @@ Header::sanityCheck (bool isTiled, bool isMultipartFile) const const TileDescription &tileDesc = tileDescription(); - i...
### File: OpenEXR/IlmImf/ImfHeader.cpp ```c /////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // mod...
### File: OpenEXR/IlmImf/ImfHeader.cpp ```c /////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // mod...
{ "project_id": "openexr_openexr", "before_commit": "1cbf6b9a4497f71586ac11dc60ed21cf0cc529bd", "after_commit": "6bad53af7eebed507564dd5fc90320e4c6a6c0bc", "repo_path": "/workspace/repo/openexr/openexr", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2023-3745
csa159
csa159/pair_136864
CSA
c/c++
ImageMagick_ImageMagick6
pair_136864
csa159/tasks/pair_136864
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/coders/tiff.c b/coders/tiff.c index 0256a6c1e..15c993364 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1701,7 +1701,8 @@ RestoreMSCWarning } if (TIFFIsTiled(tiff) != MagickFalse) method=ReadTileMethod; - if (photometric == PHOTOMETRIC_LOGLUV) + if ((photometric == PHOTOMETRIC_...
### File: coders/tiff.c ```c static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowTIFFException(severity,message) \ { \ if (pixel_info != (MemoryInfo *) NULL) \ pixel_info=RelinquishVirtualMemory(pixel_info); \ if (quantum_info != (QuantumInfo *) NULL) \ quantu...
### File: coders/tiff.c ```c static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowTIFFException(severity,message) \ { \ if (pixel_info != (MemoryInfo *) NULL) \ pixel_info=RelinquishVirtualMemory(pixel_info); \ if (quantum_info != (QuantumInfo *) NULL) \ quantu...
{ "project_id": "ImageMagick_ImageMagick6", "before_commit": "b466a96965afc1308a4ace93f5535c2b770f294b", "after_commit": "7486477aa00c5c7856b111506da075b6cdfa8b73", "repo_path": "/workspace/repo/ImageMagick/ImageMagick6", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-p...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2017-5627
csa159
csa159/pair_137200
CSA
c/c++
ccxvii_mujs
pair_137200
csa159/tasks/pair_137200
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/regexp.c b/regexp.c index 01c18a3..4a5948b 100644 --- a/regexp.c +++ b/regexp.c @@ -16,6 +16,7 @@ #define REPINF 255 #define MAXTHREAD 1000 #define MAXSUB REG_MAXSUB +#define MAXPROG (32 << 10) typedef struct Reclass Reclass; typedef struct Renode Renode; @@ -595,23 +596,25 @@ struct Reinst { Rein...
### File: regexp.c ```c static int count(Renode *node) { int min, max; if (!node) return 0; switch (node->type) { default: return 1; case P_CAT: return count(node->x) + count(node->y); case P_ALT: return count(node->x) + count(node->y) + 2; case P_REP: min = node->m; max = node->n; if (min == max) return c...
### File: regexp.c ```c static int count(struct cstate *g, Renode *node) { int min, max, n; if (!node) return 0; switch (node->type) { default: return 1; case P_CAT: return count(g, node->x) + count(g, node->y); case P_ALT: return count(g, node->x) + count(g, node->y) + 2; case P_REP: min = node->m; max = no...
{ "project_id": "ccxvii_mujs", "before_commit": "77ab465f1c394bb77f00966cd950650f3f53cb24", "after_commit": "fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045", "repo_path": "/workspace/repo/ccxvii/mujs", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/benchmark/data-pipeline/snapshots/ccxvii_m...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2020-23306
csa159
csa159/pair_137357
CSA
c/c++
jerryscript-project_jerryscript
pair_137357
csa159/tasks/pair_137357
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/jerry-core/parser/js/js-parser-statm.c b/jerry-core/parser/js/js-parser-statm.c index 38182f95..0647a54a 100644 --- a/jerry-core/parser/js/js-parser-statm.c +++ b/jerry-core/parser/js/js-parser-statm.c @@ -2592,6 +2592,16 @@ parser_parse_label (parser_context_t *context_p) /**< context */ parser_stack_i...
### File: jerry-core/parser/js/js-parser-statm.c ```c static void parser_parse_label (parser_context_t *context_p) /**< context */ { parser_stack_iterator_t iterator; parser_label_statement_t label_statement; parser_stack_iterator_init (context_p, &iterator); while (true) { uint8_t type = parser_stack_i...
### File: jerry-core/parser/js/js-parser-statm.c ```c static void parser_parse_label (parser_context_t *context_p) /**< context */ { parser_stack_iterator_t iterator; parser_label_statement_t label_statement; parser_stack_iterator_init (context_p, &iterator); while (true) { uint8_t type = parser_stack_i...
{ "project_id": "jerryscript-project_jerryscript", "before_commit": "4aa27371b6de44d87d96713ef3b3d87dd988a957", "after_commit": "bd1c4df9a608cc7193330944c857ca4f6294b993", "repo_path": "/workspace/repo/jerryscript-project/jerryscript", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/be...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...
csa
CVE-2021-46349
csa159
csa159/pair_137374
CSA
c/c++
jerryscript-project_jerryscript
pair_137374
csa159/tasks/pair_137374
# Task: Synthesize a CSA Checker from a CVE Patch ## Your Role You are a static analysis expert. Synthesize a Clang Static Analyzer (CSA) checker that detects the bug pattern fixed by the CVE patch in this working directory. You have full filesystem and bash access — use them. ### Skills Many skills are available ...
diff --git a/jerry-core/vm/opcodes.c b/jerry-core/vm/opcodes.c index 710c1552..ee644487 100644 --- a/jerry-core/vm/opcodes.c +++ b/jerry-core/vm/opcodes.c @@ -1235,6 +1235,11 @@ opfunc_find_private_key (ecma_object_t *class_object_p, /**< class environment * ecma_string_t *search_key_p, /**< k...
### File: jerry-core/vm/opcodes.c ```c static ecma_property_t * opfunc_find_private_key (ecma_object_t *class_object_p, /**< class environment */ ecma_object_t *obj_p, /**< object */ ecma_string_t *search_key_p, /**< key */ ecma_string_t **out_p...
### File: jerry-core/vm/opcodes.c ```c static ecma_property_t * opfunc_find_private_key (ecma_object_t *class_object_p, /**< class environment */ ecma_object_t *obj_p, /**< object */ ecma_string_t *search_key_p, /**< key */ ecma_string_t **out_p...
{ "project_id": "jerryscript-project_jerryscript", "before_commit": "8fa7819c1f79c7c28aba7ed8ceb4d00cc007e839", "after_commit": "2a3782141c75eb5be5d99eaab42541ea510321b4", "repo_path": "/workspace/repo/jerryscript-project/jerryscript", "llvm_build_dir": "/opt/llvm", "before_compile_commands": "/workspace/be...
// ============================================================================ // CSA Checker Template // ============================================================================ // Fill in the sections marked with TODO to implement your checker. // The checker is compiled with -fno-rtti to match the LLVM 18 build...