Introduction
Introduction Statistics Contact Development Disclaimer Help
only set dlen if data is non-NULL - teed - A multiplex relay tee(1) daemon.
git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d…
Log
Files
Refs
Tags
README
LICENSE
---
commit 108ea8962d23bdccac4e5cfd60dc179a1cea300a
parent 81543713efc69529db9bbcbd90e0b16a4481a45f
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 14 Aug 2023 15:10:09 +0200
only set dlen if data is non-NULL
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
M teed.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/teed.c b/teed.c
@@ -87,11 +87,13 @@ llist_new(llist *prev, llist *next, void *data, int len)
}
ret->prev = prev;
ret->next = next;
- ret->dlen = len;
- if (data != NULL)
+ if (data != NULL) {
ret->data = memdup(data, len);
- else
+ ret->dlen = len;
+ } else {
ret->data = NULL;
+ ret->dlen = 0;
+ }
return ret;
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.