]> git.ipfire.org Git - thirdparty/nftables.git/commit
datatype: avoid crash in debug mode when printing integers
authorFlorian Westphal <fw@strlen.de>
Fri, 26 Jun 2015 08:50:44 +0000 (10:50 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Jun 2015 00:06:36 +0000 (02:06 +0200)
commit7feb84a9cce184ce5bb2b6dbbebfbacf16403fb0
tree4713acdb69d8ff5c093a581c96581714f1807a78
parent1eb09e0de322543c9437d43cae8528db7484d8a3
datatype: avoid crash in debug mode when printing integers

nft -i --debug=all
nft> add rule ip filter foo mark 42

dies with sigfpe; seems mpz doesn't like len 0:
#1  0x0805f2ee in mpz_export_data (data=0xbfeda588, op=0x9d9fb08, byteorder=BYTEORDER_HOST_ENDIAN, len=0) at gmputil.c:115

After patch this prints 0x0000002a.

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