On Monday 05 November 2007 09:58, Hanno Böck wrote: > The problem is that the current code uses _getshort, which is an internal > function of glibc not meant to be used by anything else.
From the patch: +++ openvas-libraries-1.0.0-patch/libopenvas_hg/hg_dns_axfr.c @@ -82,7 +82,7 @@ [...] - type = _getshort(cp); + type = (short) cp; This is definitely wrong. cp is a pointer to unsigned char. _getshort retrieves a 16 bit unsigned int from where cp points to. The patch simply cases the pointer to short which will produce a completely bogus value. The are two problems with respect to _getshort. 1. _getshort is not really a public function from libresolv, so it probably should not be used. However, googling around shows that it seems to frequently used anyway. The proper fix is to _getshort by our own implementation and use that instead. 2. libopenvas_hq is not linked agains libresolv. regardless of how we fix the _getshort usage, libopenvas_hq should be linked with -lresolv, because it also uses other functions from libresolv. Bernhard
pgpuLv092fvbS.pgp
Description: PGP signature
_______________________________________________ Openvas-devel mailing list [email protected] http://lists.wald.intevation.org/mailman/listinfo/openvas-devel
