Skip to content

Commit 74e19d4

Browse files
committed
emcute: never return from receive loop
Without this change an attacker would be able to stop the emcute server by sending a crafted packet triggering this branch. The solution is using `continue` instead of `return`.
1 parent 7bbdb74 commit 74e19d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • sys/net/application_layer/emcute

sys/net/application_layer/emcute/emcute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void emcute_run(uint16_t port, const char *id)
515515

516516
if ((len < 0) && (len != -ETIMEDOUT)) {
517517
LOG_ERROR("[emcute] error while receiving UDP packet\n");
518-
return;
518+
continue;
519519
}
520520

521521
if (len >= 2) {

0 commit comments

Comments
 (0)