Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap all stream write calls with nil checks #11

Open
nettrino opened this issue Jun 8, 2023 · 0 comments
Open

Wrap all stream write calls with nil checks #11

nettrino opened this issue Jun 8, 2023 · 0 comments

Comments

@nettrino
Copy link
Contributor

nettrino commented Jun 8, 2023

There might be cases where config entry is invalid thus resolvePath will fail and stream will be nil even after a newFileStream. An example case is in https://github.com/crashappsec/nimutils/blob/main/src/nimutils/sinks.nim#L32 which has resulted in nil deref in some tests. Should we create a generic wrapper on all stream writes with a check for nil, throwing an exception or logging and returning if the stream is nil?

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

No branches or pull requests

1 participant