]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix gssalloc_realloc() on Windows 990/head
authorGreg Hudson <ghudson@mit.edu>
Mon, 21 Oct 2019 14:29:35 +0000 (10:29 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 22 Oct 2019 00:47:51 +0000 (20:47 -0400)
commitd66b311093f1782c3610bbc77bd78fce411e8f79
treef80ef0399790f24ed107d6e4f73de79e4061b78c
parentb835476dba949bad41295ce13afa7e9270963c20
Fix gssalloc_realloc() on Windows

gss_inquire_sec_context_by_oid(GSS_C_INQ_SSPI_SESSION_KEY) fails on
Windows because generic_gss_add_buffer_set_member() relies on the
ability to realloc() a null pointer.  Unlike realloc(), HeapReAlloc()
requires an input pointer that (from the MSDN documentation) "is
returned by an earlier call to the HeapAlloc or HeapReAlloc function".
So gssalloc_realloc() must test for null inputs and call HeapAlloc()
instead.

Reported by Eric Pauly.

ticket: 8735
tags: pullup
target_version: 1.17-next
src/lib/gssapi/generic/gssapi_alloc.h