r2205: fixed an incorrect cast that broke relative strings in spoolss
authorAndrew Tridgell <tridge@samba.org>
Fri, 3 Sep 2004 12:52:04 +0000 (12:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:58:31 +0000 (12:58 -0500)
(This used to be commit d2d3433de1c1e1bc757381e9736147cc24fe8cf0)

source4/librpc/ndr/ndr_basic.c

index d015cc5e48c93757bb45a97cb07b5641199468d6..01205d4043b0305bf0f76016744509e6fadcd3fd 100644 (file)
@@ -548,7 +548,7 @@ NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s)
                break;
 
        case LIBNDR_FLAG_STR_NULLTERM:
-               len1 = strnlen_w((const smb_ucs2_t *)ndr->data+ndr->offset
+               len1 = strnlen_w((const smb_ucs2_t *)(ndr->data+ndr->offset)
                                 (ndr->data_size - ndr->offset)/2);
                if (len1*2+2 <= ndr->data_size - ndr->offset) {
                        len1++;