Ignore:
Timestamp:
Mar 25, 2007, 5:18:51 PM (19 years ago)
Author:
Yuri Dario
Message:

Source code upgrade to 3.0.25pre2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/librpc/ndr/ndr.c

    r1 r22  
    161161
    162162/*
    163   expand the available space in the buffer to 'size'
    164 */
    165 NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
    166 {
     163  expand the available space in the buffer to ndr->offset + extra_size
     164*/
     165NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t extra_size)
     166{
     167        uint32_t size = extra_size + ndr->offset;
     168
     169        if (size < ndr->offset) {
     170                /* extra_size overflowed the offset */
     171                return ndr_push_error(ndr, NDR_ERR_BUFSIZE, "Overflow in push_expand to %u",
     172                                        size);
     173        }
     174
    167175        if (ndr->alloc_size > size) {
    168176                return NT_STATUS_OK;
Note: See TracChangeset for help on using the changeset viewer.