12 Mar
2024
12 Mar
'24
9:10 a.m.
Hans Leidekker (@hans) commented about dlls/kerberos/krb5_ap.c:
}
if ((idx = get_buffer_index( output, SECBUFFER_TOKEN )) == -1) return SEC_E_INVALID_TOKEN; + if (context_req & ISC_REQ_ALLOCATE_MEMORY) + { + output->pBuffers[idx].pvBuffer = RtlAllocateHeap( GetProcessHeap(), 0, KERBEROS_MAX_BUF ); + output->pBuffers[idx].cbBuffer = KERBEROS_MAX_BUF; + }
Can you add a check for allocation failure? We should should probably return ISC_RET_ALLOCATED_MEMORY in context_attr when ISC_REQ_ALLOCATE_MEMORY was passed. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5286#note_64349