That length is used to advance the pointer into the packet, so it has to
include the padding.
size_t l = 0;
uint32_t strsize;
const u_char *sp;
+ int padding = 0;
if (use_unicode) {
/*
if (((s - startbuf) % 2) != 0) {
ND_TCHECK_1(s);
s++;
+ padding++;
}
}
if (*len == 0) {
}
strsize = *len - 2;
}
+ *len += padding;
} else {
/*
* Counted string.
*/
strsize = *len;
+ *len += padding;
}
if (!use_unicode) {
while (strsize != 0) {