]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
meta: fix asan runtime error in tc handle
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 7 Jun 2020 17:56:40 +0000 (19:56 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 7 Jun 2020 22:26:17 +0000 (00:26 +0200)
ASAN reports:

 meta.c:92:17: runtime error: left shift of 34661 by 16 places cannot be represented in type 'int'

use 32-bit integer as tmp variable.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/meta.c

index acc348eb264ddad92a6af77b5ccd8834d898640d..d92d0d323b9b9b5787c47cbdaea179d7508f9f95 100644 (file)
@@ -73,7 +73,7 @@ static struct error_record *tchandle_type_parse(struct parse_ctx *ctx,
        else if (strcmp(sym->identifier, "none") == 0)
                handle = TC_H_UNSPEC;
        else if (strchr(sym->identifier, ':')) {
-               uint16_t tmp;
+               uint32_t tmp;
                char *colon;
 
                str = xstrdup(sym->identifier);