Given this rule in /etc/ipac-ng/rules.conf: example|ipac~o|+|tcp|||helper --helper "ftp"| fetchipac -S segfaults when trying to process this rule Reproducible: Always Steps to Reproduce: 1. create a rule.conf with above rule 2. fetchipac -S 3. see fetchipac segfaulting Actual Results: SegFault Expected Results: corresponding rule in chain ipac~o $ emerge --info Portage 2.1.2.7 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r2, 2.6.17.13 i686) ================================================================= System uname: 2.6.17.13 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System release 1.12.9 Timestamp of tree: Wed, 23 May 2007 02:20:01 +0000 dev-java/java-config: 1.3.7, 2.0.31-r5 dev-lang/python: 2.3.5-r3, 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=athlon-xp -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo" LINGUAS="de en" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X aac acl acpi alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups curl dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif gpm gstreamer gtk2 hal iconv idn ipv6 isdnlog java jpeg kde kdeenablefinal kerberos ldap libg++ lm_sensors mad midi mikmod mmx mmx2 mozilla mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt qt3 qt3support qt4 quicktime readline real reflection samba sdl session slang spell spl sse ssl svg svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs winbind x86 xcomposite xine xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="radeon nv vesa vga" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS fetchipac crashes in this case because it tries to call the init-function of libipt_helper.so (line 1382 of agents/iptables/iptables.c of already patched file). Unfortunately the libipt_helper.so does not have an init-function. It should be checked if (m->init != NULL) before trying to call this function ptr. Same could happen in line 1333.
Created attachment 120065 [details, diff] Only call init-function of extension when m->init != NULL
added as -r3, thanks for the patch and keep up the good work :)