From 150303b2b88fff33dba96d6fabaf517bec3fb9ec Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 22 Aug 2022 17:13:43 +0200 Subject: user/netstack: ARP cache --- src/shared/printf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shared') 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); -- cgit v1.2.3