[16112] in Kerberos-V5-bugs
[krbdev.mit.edu #8735] GSS buffer set failures on Windows due to
daemon@ATHENA.MIT.EDU (Greg Hudson via RT)
Thu Sep 13 10:48:43 2018
Mail-followup-to: rt@krbdev.mit.edu
mail-copies-to: never
From: "Greg Hudson via RT" <rt-comment@KRBDEV-PROD-APP-1.mit.edu>
In-Reply-To: <rt-8735@krbdev.mit.edu>
Message-ID: <rt-8735-48809.15.0282927894063@krbdev.mit.edu>
To: "'AdminCc of krbdev.mit.edu Ticket #8735'":;
Date: Thu, 13 Sep 2018 10:48:37 -0400 (EDT)
Reply-To: rt-comment@KRBDEV-PROD-APP-1.mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu
Thanks for the report. The MSDN documentation for HeapReAlloc() does
say that the input pointer "is returned by an earlier call to the
HeapAlloc or HeapReAlloc function" so I guess it is within its rights
to fail on a NULL input, unlike C's realloc().
Do you have a patch that you have tested for this issue? My initial
inclination is to change the Windows definition of gssalloc_realloc()
(in gssapi_alloc.h) to:
static inline void *
gssalloc_realloc(void *value, size_t size)
{
/* Unlike realloc(), HeapReAlloc() does not work on NULL. */
if (value == NULL)
return HeapAlloc(GetProcessHeap(), 0, size);
return HeapReAlloc(GetProcessHeap(), 0, value, size);
}
_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs