hi every1,
perhaps some one be able to help me in that worst deal...
actually I use libiptc & libxtables from netfilter project and have got this trace....
it happening every time if I do to call function from those libraries, e.g xtables_error(), xtables_find_target(), add_command() and any other..., but unfortunately everywhere I has segfault.
1 2 3 4 5 6 7 8 9 10 11 12
==21005== Invalid read of size 4
==21005== at 0x4050D4B: xtables_find_target (xtables.c:626)
==21005== by 0x804C723: main (in /home/quant/table)
==21005== Address 0x4 is not stack'd, malloc'd or (recently) free'd
==21005==
==21005== Process terminating with default action of signal 11 (SIGSEGV)
==21005== Access not within mapped region at address 0x4
==21005== at 0x4050D4B: xtables_find_target (xtables.c:626)
==21005== by 0x804C723: main (in /home/quant/table)
--21005-- REDIR: 0x40c4790 (free) redirected to 0x4022ad0 (free)
==21005==
==21005== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 19 from 1)
there... how i do configuration libs after building and installation. ./configure --prefix=/usr/local --enable-devel --enable-libipq --enable-static
allocation for what I should do?
gcc -Wall -ggdb -o table -I/usr/iptables-1.4.4/include/ -L/usr/iptables-1.4.4/lib/ -liptc -lxtables iptest.c
valgrind -v --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp ./table
if this is the code in which you are getting errors, i want to know if "xt_params" is initializing somewhere before the code enters main? because if its not then it will fault. Rest the program looks ok..