From 69ea1986f26b8afd18cb752eefc60b6b4499bad4 Mon Sep 17 00:00:00 2001 From: yr2004 Date: Mon, 29 Apr 2019 09:36:09 +0800 Subject: [PATCH] Update net.c the packet buf should be memseted --- src/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index 3e2bcc602e..0121b69dc0 100644 --- a/src/net.c +++ b/src/net.c @@ -1124,7 +1124,7 @@ coap_read_session(coap_context_t *ctx, coap_session_t *session, coap_tick_t now) coap_packet_t s_packet; #endif /* ! COAP_CONSTRAINED_STACK */ coap_packet_t *packet = &s_packet; - + memset(&s_packet, 0, sizeof(coap_packet_t)); #if COAP_CONSTRAINED_STACK coap_mutex_lock(&s_static_mutex); #endif /* COAP_CONSTRAINED_STACK */