From 31e96d8def1dd2fea76d31a032d64e5917462dc8 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 20 Oct 2004 02:02:00 +0000 Subject: r3073: Fix bug in the handling of null-terminated ASCII strings in RPC. Because we didn't count the null terminator, we would not move past it in the packet. Andrew Bartlett (This used to be commit 8b38bffc7098610c469ab61b7e0e6884f046f286) --- source4/librpc/ndr/ndr_basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/librpc/ndr/ndr_basic.c') diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 5808ae7452..239b28e3e7 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -657,7 +657,7 @@ NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s) case LIBNDR_FLAG_STR_NULLTERM: if (byte_mul == 1) { - len1 = strnlen(ndr->data+ndr->offset, ndr->data_size - ndr->offset); + len1 = ascii_len_n(ndr->data+ndr->offset, ndr->data_size - ndr->offset); } else { len1 = utf16_len_n(ndr->data+ndr->offset, ndr->data_size - ndr->offset); } -- cgit