From 7a012f4793c15d082b888591c25f39cb4625dc61 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 25 Apr 2016 21:26:07 +0300 Subject: [PATCH] extmod/modlwip: Protect recv/accept Python callback against exceptions. Using usual call_function_*_protected() helper, to avoid NLR jump crashes. --- extmod/modlwip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 778a741b3d..4924130ccf 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -264,7 +264,7 @@ static inline void poll_sockets(void) { static inline void exec_user_callback(lwip_socket_obj_t *socket) { if (socket->callback != MP_OBJ_NULL) { - mp_call_function_1(socket->callback, socket); + mp_call_function_1_protected(socket->callback, socket); } }