Re: [PATCH] netfilter: Don't parse CTCP message if shorter than minimum length

From: Florian Westphal
Date: Wed Jun 21 2023 - 04:45:05 EST


Sohom <sohomdatta1@xxxxxxxxx> wrote:
> If the CTCP message is shorter than 10 + 21 + MINMATCHLEN
> then exit early and don't parse the rest of the message.

Please send a v2 explaining why, not what.

> + if (data >= data_limit - (10 + 21 + MINMATCHLEN)) {
> + goto out;
> + }

Please run your patches through scripts/checkpatch.pl,
we don't use { } for single-line conditional bodies.

> /* Skip any whitespace */
> - while (data < data_limit - 10) {
> + while (data < data_limit) {

Why this change?