diff --git a/sys/net/application_layer/emcute/emcute.c b/sys/net/application_layer/emcute/emcute.c index 81ae2a7fe0..e93b725d5e 100644 --- a/sys/net/application_layer/emcute/emcute.c +++ b/sys/net/application_layer/emcute/emcute.c @@ -63,7 +63,9 @@ static volatile int result; static size_t set_len(uint8_t *buf, size_t len) { - if (len < (0xff - 7)) { + /* - `len` field minimum length == 1 + * - `((len + 1) <= 0xff) == len < 0xff` */ + if (len < 0xff) { buf[0] = len + 1; return 1; }