check return value of base64_encode

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4119 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-12-05 02:36:03 +00:00
parent 6f6a22910b
commit 057ac0c276
4 changed files with 29 additions and 9 deletions

View File

@@ -231,7 +231,10 @@ kauth(char *principal, char *ticket)
reply(500, "Kerberos error: %s.", krb_get_err_text(ret));
return;
}
base64_encode(cip.dat, cip.length, &p);
if(base64_encode(cip.dat, cip.length, &p) < 0) {
reply(500, "Out of memory while base64-encoding.");
return;
}
reply(300, "P=%s T=%s", krb_unparse_name(&pr), p);
free(p);
memset(&cip, 0, sizeof(cip));