Proper check for success of `base64_decode'

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1477 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-03-23 05:02:32 +00:00
parent 02b12a9a7e
commit 92b5a08e81
2 changed files with 7 additions and 4 deletions

View File

@@ -86,12 +86,13 @@ int krb4_adat(char *auth)
char inst[INST_SZ];
memset(&tkt, 0, sizeof(tkt));
tkt.length = base64_decode(auth, tkt.dat);
len = base64_decode(auth, tkt.dat);
if(tkt.length < 0){
if(len < 0){
reply(501, "Failed to decode base64 data.");
return -1;
}
tkt.length = len;
k_getsockinst(0, inst);
kerror = krb_rd_req(&tkt, "ftp", inst, 0, &auth_dat, "");