diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-07-23 13:29:08 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-07-23 13:29:08 +0000 |
| commit | fabfef9c82192b04a52cdd092a81d8e10ca20fbf (patch) | |
| tree | d4f7c0765132c07006eb14af0b3e692c824ea2d6 | |
| parent | osc: remove unused includes (diff) | |
notify: consume_stdout(): fix ASAN warning
This is an ASAN false positive; size is always 0 when we're passing a
NULL pointer.
Still, the warning is easy to avoid, so let's do that to reduce the
noise level.
| -rw-r--r-- | notify.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -63,8 +63,10 @@ consume_stdout(struct notification *notif, bool eof) left -= len + (eol != NULL ? 1 : 0); } - memmove(notif->stdout_data, data, left); - notif->stdout_sz = left; + if (left > 0) { + memmove(notif->stdout_data, data, left); + notif->stdout_sz = left; + } } static bool |
