[Bastian Blank]
> Also gcc shows buffer overflows:

As far as I can tell, this seem to be mostly theoretical.  To reduce the
chance of this affecting anything, I added a patch to git to get rid of
it.

> And an instrumented cmpaddr function shows the condition that reaches
> abort():

Good idea.  I did the same applying this patch the git source, where the
autopkgtest has been fixed:


--- nslint-3.2.orig/nslint.c
+++ nslint-3.2/nslint.c
@@ -592,6 +592,7 @@ cmpaddr(const void *arg1, const void *ar
        n1 = (const struct network *)arg1;
        n2 = (const struct network *)arg2;
 
+       printf("got family: %d, %d\n", n1->family, n2->family);
        /* IPv4 before IPv6 */
        if (n1->family != n2->family)
                return ((n1->family == AF_INET) ? -1 : 1);

With this patch I place, I get the following on amd64:

  % NSLINT="`pwd`/nslint" debian/tests/validate-bind-zones
  got family: 2, 2
  got family: 2, 2
  got family: 396612976, 398862656
  got family: 0, 2
  got family: 2, 2
  success: no error in zone detected
  got family: 2, 2
  got family: 2, 2
  nslint: Missing "a": tjener.intern. -> 10.0.0.2
  nslint: Missing "ptr": tjener.intern. -> 10.0.2.2
  got family: -1350817472, -1350817432
  got family: -1353067152, -1350817432
  got family: -1353067152, -1350817472
  got family: 0, 2
  got family: 2, 2
  got family: 2, 2
  success: error in zone detected.
  %

> Fixing the first error, aka replace with cmpitemaddr does not work
> either, because the qsort calls it with "struct item **", not "struct
> item *".  The cmpitemaddr function is unused otherwise.

As far as I can tell, the qsort code in question try to sort a list of
addresses, not a list of struct item, so struct item ** seem correct.

> Now I have to ask you, if you really are capable to maintain a package
> in this state?

I absolutely do not plan to stand in the way of anyone willing to adapt
this package.

-- 
Happy hacking
Petter Reinholdtsen

Reply via email to