Skip to content

Commit

Permalink
heimdal: Fix CID 241943 Uninitialized pointer read
Browse files Browse the repository at this point in the history
In the error case without EXTRA_ADDRESSES we access ignore_addresses
without initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
  • Loading branch information
vlendec authored and nicowilliams committed Mar 25, 2014
1 parent b408e93 commit 2aca5c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/krb5/get_addrs.c
Expand Up @@ -128,7 +128,8 @@ find_all_addresses (krb5_context context, krb5_addresses *res, int flags)
/* Allocate storage for them. */
res->val = calloc(num, sizeof(*res->val));
if (res->val == NULL) {
krb5_free_addresses(context, &ignore_addresses);
if (flags & EXTRA_ADDRESSES)
krb5_free_addresses(context, &ignore_addresses);
freeifaddrs(ifa0);
return krb5_enomem(context);
}
Expand Down

0 comments on commit 2aca5c4

Please sign in to comment.