projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae84c9b
)
oops, need to compare lengths first..
author
John Kohl
<jtkohl@mit.edu>
Wed, 27 Feb 1991 10:57:21 +0000
(10:57 +0000)
committer
John Kohl
<jtkohl@mit.edu>
Wed, 27 Feb 1991 10:57:21 +0000
(10:57 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1794
dc483132
-0cff-0310-8789-
dd5450dbe970
src/lib/krb5/krb/princ_comp.c
patch
|
blob
|
history
diff --git
a/src/lib/krb5/krb/princ_comp.c
b/src/lib/krb5/krb/princ_comp.c
index 57787d7f0973191076341841b1cbbed42a9dc186..4d0d3120eb2573dfdaeda7d63ac9973f4037e855 100644
(file)
--- a/
src/lib/krb5/krb/princ_comp.c
+++ b/
src/lib/krb5/krb/princ_comp.c
@@
-31,10
+31,13
@@
krb5_const_principal princ2;
{
register krb5_data * const *p1, * const *p2;
- for (p1 = princ1, p2 = princ2; *p1 && *p2; p1++, p2++)
- if (memcmp((*p1)->data, (*p2)->data, min((*p1)->length,
- (*p2)->length)))
+ for (p1 = princ1, p2 = princ2; *p1 && *p2; p1++, p2++) {
+ if ((*p1)->length != (*p2)->length)
return FALSE;
+ if (memcmp((*p1)->data, (*p2)->data, (*p1)->length))
+
+ return FALSE;
+ }
if (*p1 || *p2) /* didn't both run out of components
at once */
return FALSE;