From: John Kohl Date: Mon, 25 Feb 1991 10:21:54 +0000 (+0000) Subject: use memcmp, not strncmp X-Git-Tag: krb5-1.0-alpha4~203 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e8ad81419d8d107ca985cc02673916814531b1a;p=krb5.git use memcmp, not strncmp git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1769 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/princ_comp.c b/src/lib/krb5/krb/princ_comp.c index 2cd0470e5..57787d7f0 100644 --- a/src/lib/krb5/krb/princ_comp.c +++ b/src/lib/krb5/krb/princ_comp.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -16,8 +17,6 @@ static char rcsid_princ_comp_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include - #include #include @@ -33,10 +32,11 @@ krb5_const_principal princ2; register krb5_data * const *p1, * const *p2; for (p1 = princ1, p2 = princ2; *p1 && *p2; p1++, p2++) - if (strncmp((*p1)->data, (*p2)->data, min((*p1)->length, - (*p2)->length))) + if (memcmp((*p1)->data, (*p2)->data, min((*p1)->length, + (*p2)->length))) return FALSE; - if (*p1 || *p2) /* didn't both run out at once */ + if (*p1 || *p2) /* didn't both run out of components + at once */ return FALSE; return TRUE; }