Ignore:
Timestamp:
Apr 10, 2007, 5:27:38 AM (14 years ago)
Author:
Paul Smedley
Message:

Updated source to 3.0.25rc1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/smbd/ipc.c

    r1 r26  
    479479        if (state->total_data)  {
    480480                /* Can't use talloc here, the core routines do realloc on the
    481                  * params and data. */
    482                 state->data = (char *)SMB_MALLOC(state->total_data);
     481                 * params and data. Out of paranoia, 100 bytes too many. */
     482                state->data = (char *)SMB_MALLOC(state->total_data+100);
    483483                if (state->data == NULL) {
    484484                        DEBUG(0,("reply_trans: data malloc fail for %u "
     
    488488                        return(ERROR_DOS(ERRDOS,ERRnomem));
    489489                }
     490                /* null-terminate the slack space */
     491                memset(&state->data[state->total_data], 0, 100);
    490492                if ((dsoff+dscnt < dsoff) || (dsoff+dscnt < dscnt))
    491493                        goto bad_param;
     
    499501        if (state->total_param) {
    500502                /* Can't use talloc here, the core routines do realloc on the
    501                  * params and data. */
    502                 state->param = (char *)SMB_MALLOC(state->total_param);
     503                 * params and data. Out of paranoia, 100 bytes too many */
     504                state->param = (char *)SMB_MALLOC(state->total_param+100);
    503505                if (state->param == NULL) {
    504506                        DEBUG(0,("reply_trans: param malloc fail for %u "
     
    509511                        return(ERROR_DOS(ERRDOS,ERRnomem));
    510512                }
     513                /* null-terminate the slack space */
     514                memset(&state->param[state->total_param], 0, 100);
    511515                if ((psoff+pscnt < psoff) || (psoff+pscnt < pscnt))
    512516                        goto bad_param;
Note: See TracChangeset for help on using the changeset viewer.