diff options
| author | Theodore Tso <tytso@mit.edu> | 1993-06-03 00:11:44 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1993-06-03 00:11:44 +0000 |
| commit | 22a9b4318e323040f7931281cf8914d07c07210a (patch) | |
| tree | 311a7888d2b580745e4e31bece172006f57dda4d /src/lib | |
| parent | 7e9caf076c7a72d4c614788d0a137a193f2ceb37 (diff) | |
Fix bug where an allocated structure was used before it was checked to
see if it were null.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2552 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/krb/copy_auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/krb5/krb/copy_auth.c b/src/lib/krb5/krb/copy_auth.c index c4352191c..f3d19865e 100644 --- a/src/lib/krb5/krb/copy_auth.c +++ b/src/lib/krb5/krb/copy_auth.c @@ -65,13 +65,13 @@ krb5_authdata ***outauthdat; krb5_authdata ** tempauthdat; register int nelems = 0; - while (inauthdat[nelems]) nelems++; - if (!inauthdat) { *outauthdat = 0; return 0; } + while (inauthdat[nelems]) nelems++; + /* one more for a null terminated list */ if (!(tempauthdat = (krb5_authdata **) calloc(nelems+1, sizeof(*tempauthdat)))) |
