Skip to content

CFE-4595: Fixed crash when reading empty yaml files#257

Merged
olehermanse merged 1 commit intoNorthernTechHQ:masterfrom
olehermanse:master
Oct 3, 2025
Merged

CFE-4595: Fixed crash when reading empty yaml files#257
olehermanse merged 1 commit intoNorthernTechHQ:masterfrom
olehermanse:master

Conversation

@olehermanse
Copy link
Copy Markdown
Contributor

No description provided.

@olehermanse
Copy link
Copy Markdown
Contributor Author

@cf-bottom jenkins, please :)

Ticket: CFE-4595
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
@cf-bottom
Copy link
Copy Markdown

@olehermanse
Copy link
Copy Markdown
Contributor Author

olehermanse commented Oct 3, 2025

Debug builds don't crash since they hit an assert, but otherwise I reproduced and fixed the issue.

Before:

cf-agent: json.c:913: JsonAt: Assertion `index < JsonLength(container)

After:

error: readyaml: data error parsing YAML file '/tmp/foo.yml': No data'

@olehermanse olehermanse merged commit b1d4fd3 into NorthernTechHQ:master Oct 3, 2025
8 of 10 checks passed
olehermanse added a commit to olehermanse/core that referenced this pull request Oct 3, 2025
Technically, the fix itself is in the libntech repo;
NorthernTechHQ/libntech#257

Ticket:CFE-4595
Changelog: Title
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
olehermanse added a commit to olehermanse/core that referenced this pull request Oct 3, 2025
Technically, the fix itself is in the libntech repo;
NorthernTechHQ/libntech#257

Ticket:CFE-4595
Changelog: Title
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
olehermanse added a commit to olehermanse/core that referenced this pull request Oct 3, 2025
Technically, the fix itself is in the libntech repo;
NorthernTechHQ/libntech#257

Ticket:CFE-4595
Changelog: Title
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 2606188)
olehermanse added a commit to olehermanse/core that referenced this pull request Oct 3, 2025
Technically, the fix itself is in the libntech repo;
NorthernTechHQ/libntech#257

Ticket:CFE-4595
Changelog: Title
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
(cherry picked from commit 2606188)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants