summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authordzwdz2022-08-22 17:13:43 +0200
committerdzwdz2022-08-22 17:13:43 +0200
commit150303b2b88fff33dba96d6fabaf517bec3fb9ec (patch)
tree6d1b9c408a78599047427c53bdd5599f19f41e61 /src/shared
parentd5cca73003febe187f5383bc80d3378966d060c0 (diff)
user/netstack: ARP cache
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/printf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/printf.c b/src/shared/printf.c
index 2dc3048..ff07c72 100644
--- a/src/shared/printf.c
+++ b/src/shared/printf.c
@@ -171,6 +171,7 @@ int __printf_internal(const char *fmt, va_list argp,
static void vsnprintf_backend(void *arg, const char *buf, size_t len) {
char **ptrs = arg;
size_t space = ptrs[1] - ptrs[0];
+ if (!ptrs[0]) return;
if (len > space) len = space;
memcpy(ptrs[0], buf, len);