r21814: use ndr_push_error in the ndr layer, not just a NTSTATUS failure
authorAndrew Tridgell <tridge@samba.org>
Tue, 13 Mar 2007 04:42:49 +0000 (04:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:36 +0000 (12:18 -0500)
(This used to be commit 05bd5cb6eef2f0adacc98fd2c94356006358d3d6)

source3/librpc/ndr/ndr.c

index ab73354540f9914ae917d49c50aaf3ea5a9495e5..a692f398df543c236698c2d841b66d585600f448 100644 (file)
@@ -168,7 +168,8 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size)
 
        if (size < ndr->offset) {
                /* extra_size overflowed the offset */
-               return NT_STATUS_NO_MEMORY;
+               return ndr_push_error(ndr, NDR_ERR_BUFSIZE, "Overflow in push_expand to %u",
+                                     size);
        }
 
        if (ndr->alloc_size > size) {