gssapi: initialize gss_buffer_desc strings

Explicitly initialize gss_buffer_desc strings such that a call to
freeing resources will succeed even if no data has been allocated
to it.

Reported-by: Jay Satiro <raysatiro@yahoo.com>
This commit is contained in:
Daniel Gustafsson 2022-05-12 14:12:41 +02:00
parent 7360f9a565
commit f1cdeff37a
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ static size_t display_gss_error(OM_uint32 status, int type,
OM_uint32 maj_stat;
OM_uint32 min_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
gss_buffer_desc status_string = GSS_C_EMPTY_BUFFER;
do {
maj_stat = gss_display_status(&min_stat,

View File

@ -51,7 +51,7 @@ static int check_gss_err(struct Curl_easy *data,
if(GSS_ERROR(major_status)) {
OM_uint32 maj_stat, min_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
gss_buffer_desc status_string = GSS_C_EMPTY_BUFFER;
char buf[1024];
size_t len;