12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- diff -Nru aiccu.old/common/dn_skipname.c aiccu/common/dn_skipname.c
-
-
- @@ -0,0 +1,51 @@
- +#include <errno.h>
- +#include <resolv.h>
- +
- +/* Ripped from glibc 2.4 sources. */
- +
- +/*
- + * ns_name_skip(ptrptr, eom)
- + * Advance *ptrptr to skip over the compressed name it points at.
- + * return:
- + * 0 on success, -1 (with errno set) on failure.
- + */
- +int ns_name_skip(const u_char **ptrptr, const u_char *eom)
- +{
- + const u_char *cp;
- + u_int n;
- +
- + cp = *ptrptr;
- + while (cp < eom && (n = *cp++) != 0)
- + {
- + /* Check for indirection. */
- + switch (n & NS_CMPRSFLGS) {
- + case 0: /* normal case, n == len */
- + cp += n;
- + continue;
- + case NS_CMPRSFLGS: /* indirection */
- + cp++;
- + break;
- + default: /* illegal type */
- + errno = EMSGSIZE;
- + return (-1);
- + }
- + break;
- + }
- + if (cp > eom)
- + {
- + errno = EMSGSIZE;
- + return (-1);
- + }
- + *ptrptr = cp;
- + return (0);
- +}
- +
- +int dn_skipname(const u_char *ptr, const u_char *eom)
- +{
- + const u_char *saveptr = ptr;
- +
- + if(ns_name_skip(&ptr, eom) == -1)
- + return (-1);
- + return (ptr - saveptr);
- +}
- +
- diff -Nru aiccu.old/unix-console/Makefile aiccu/unix-console/Makefile
-
-
- @@ -10,9 +10,9 @@
- # $Date: 2006-07-25 09:20:48 $
- #
|