mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-27 12:26:24 +00:00
Extra NULL check in iter2(). Fix #430
This commit is contained in:
1 parent
632b3a38a9
commit
9981b99ac8
1 file changed
+1
-1
+1
-1
@@ -5209,7 +5209,7 @@ static void iter2(struct ns_connection *nc, int ev, void *param) {
|
||||
(void) ev;
|
||||
|
||||
//DBG(("%p [%s]", conn, msg));
|
||||
if (sscanf(msg, "%p %n", &func, &n) && func != NULL) {
|
||||
if (sscanf(msg, "%p %n", &func, &n) && func != NULL && conn != NULL) {
|
||||
conn->mg_conn.callback_param = (void *) (msg + n);
|
||||
func(&conn->mg_conn, MG_POLL);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user