Skip to content

Conversation

OverOrion
Copy link
Collaborator

As _map_header_of_entry_from_handle() may fail, the return value
should be checked.

It could cause a crash, if the the handle or the entry was corrupted.

Signed-off-by: Szilárd Parrag szilard.parrag@gmail.com

As `_map_header_of_entry_from_handle()` may fail, the return value
should be checked.

Signed-off-by: Szilárd Parrag <szilard.parrag@gmail.com>
@github-actions
Copy link
Contributor

No news file has been detected. Please write one, if applicable.

@OverOrion OverOrion marked this pull request as draft August 30, 2022 08:25
@kira-syslogng
Copy link
Contributor

Build FAILURE

@OverOrion
Copy link
Collaborator Author

@kira-syslogng retest this please;

@bazsi
Copy link
Collaborator

bazsi commented Sep 1, 2022

Is there an actual occurrence of this bug? How was this found? Otherwise this looks good to me.

@OverOrion OverOrion marked this pull request as ready for review September 2, 2022 14:18
@OverOrion
Copy link
Collaborator Author

We've had a crash report, and we found it during the investigation.

(The reason why I opened it as draft was because I wanted to find code paths like this (e.g, the return value of a function that may fail is used without checks), but some of them are not that straightforward to validate, so I will merge this PR, and open a separate one for those.)

@OverOrion OverOrion merged commit 1b1d42d into syslog-ng:master Sep 2, 2022
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