(make_path): make sure we return allocated memory
Coverity, NetBSD CID#1892 git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17043 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -100,8 +100,10 @@ make_path(krb5_context context, struct tr_realm *r,
|
||||
p = from + strlen(from);
|
||||
while(1){
|
||||
while(p >= from && *p != '/') p--;
|
||||
if(p == from)
|
||||
if(p == from) {
|
||||
r->next = path; /* XXX */
|
||||
return KRB5KDC_ERR_POLICY;
|
||||
}
|
||||
if(strncmp(to, from, p - from) == 0)
|
||||
break;
|
||||
tmp = calloc(1, sizeof(*tmp));
|
||||
|
Reference in New Issue
Block a user