crashappsec / crashappsec/nimutils

Wrap all stream write calls with nil checks

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.