Ticket #36297: gssapi.c.patch

File gssapi.c.patch, 623 bytes (added by nicolasc@…, 12 years ago)

Patch for gssapi.c which fixes a NULL ptr dereference

  • gssapi.c

    old new sasl_gss_encode(void *context, const str 
    370370    }
    371371   
    372372    if (output_token->value && output) {
    373         unsigned char * p = (unsigned char *) text->encode_buf;
     373        unsigned char * p;
    374374       
    375375        ret = _plug_buf_alloc(text->utils,
    376376                              &(text->encode_buf),
    sasl_gss_encode(void *context, const str 
    383383            GSS_UNLOCK_MUTEX(text->utils);
    384384            return ret;
    385385        }
     386
     387        p = (unsigned char *) text->encode_buf;
    386388       
    387389        p[0] = (output_token->length>>24) & 0xFF;
    388390        p[1] = (output_token->length>>16) & 0xFF;