(krb5_domain_x500_encode): always zero out encoding to make sure it
have a defined value on failure git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13066 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -368,11 +368,9 @@ krb5_domain_x500_encode(char **realms, int num_realms, krb5_data *encoding)
|
||||
char *s = NULL;
|
||||
int len = 0;
|
||||
int i;
|
||||
if (num_realms == 0) {
|
||||
encoding->data = NULL;
|
||||
encoding->length = 0;
|
||||
krb5_data_zero(encoding);
|
||||
if (num_realms == 0)
|
||||
return 0;
|
||||
}
|
||||
for(i = 0; i < num_realms; i++){
|
||||
len += strlen(realms[i]);
|
||||
if(realms[i][0] == '/')
|
||||
|
Reference in New Issue
Block a user