crashappsec / crashappsec/nimutils
Wrap all stream write calls with nil checks
Open
- Dominant language
- Nim
- Stars
- 6
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.