catch error from as.*printf

This commit is contained in:
Love Hornquist Astrand
2010-05-30 13:44:41 -07:00
parent 077357c848
commit 2b1645aa08
9 changed files with 50 additions and 39 deletions

View File

@@ -47,7 +47,7 @@ OM_uint32 _gss_ntlm_display_name
if (output_name_buffer) {
ntlm_name n = (ntlm_name)input_name;
char *str;
char *str = NULL;
int len;
output_name_buffer->length = 0;
@@ -59,7 +59,7 @@ OM_uint32 _gss_ntlm_display_name
}
len = asprintf(&str, "%s@%s", n->user, n->domain);
if (str == NULL) {
if (len < 0 || str == NULL) {
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}