memcpy((void*)((char*)p12cxt->buffer + p12cxt->currentpos), buf, len);
memcpy((char*)p12cxt->buffer + p12cxt->currentpos, buf, len);
p12u_DigestWrite(void *arg, unsigned char *buf, unsigned long len){    SEC_PKCS12DecoderContext* p12cxt = arg;    if(!buf || len == 0) {        return -1;    }    if (p12cxt->currentpos+(long)len > p12cxt->filesize) {        p12cxt->filesize = p12cxt->currentpos + len;    }    else {        p12cxt->filesize += len;    }    if (p12cxt->filesize > p12cxt->allocated) {        void* newbuffer;        size_t newsize = p12cxt->filesize + DEFAULT_TEMP_SIZE;        newbuffer  = PORT_Realloc(p12cxt->buffer, newsize);        if (NULL == newbuffer) {            return -1; /* can't extend the buffer */        }        p12cxt->buffer = newbuffer;        p12cxt->allocated = newsize;    }    PR_ASSERT(p12cxt->buffer);    memcpy((void*)((char*)p12cxt->buffer + p12cxt->currentpos), buf, len);    p12cxt->currentpos += len;    return len;}