krb5-libs/1064: incorrect option processing in kg2_parse_token
Dan Riley
dsr at mail.lns.cornell.edu
Fri Feb 22 14:39:03 EST 2002
>Number: 1064
>Category: krb5-libs
>Synopsis: incorrect option processing in kg2_parse_token
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Feb 22 14:40:01 EST 2002
>Last-Modified:
>Originator: Dan Riley
>Organization:
LNS, Cornell U.
>Release: krb5-1.2.3
>Environment:
System: OSF1 lnscu6.lns.cornell.edu V4.0 1229 alpha
Machine: alpha
>Description:
The comments for kg2_parse_token say:
noptions/options lists all the options which the caller cares
about. Those which are present in the token are filled in; the
order and length are not changed.
The current code actually assigns all options to options[0], due
to '='/'==' typo and a misplaced break.
>How-To-Repeat:
>Fix:
diff -ur krb5-1.2.3/src/lib/gssapi/krb5/util_ctxsetup.c krb5/lib/gssapi/krb5/util_ctxsetup.c
--- krb5-1.2.3/src/lib/gssapi/krb5/util_ctxsetup.c Wed Jan 9 17:27:43 2002
+++ krb5/lib/gssapi/krb5/util_ctxsetup.c Sat Sep 18 13:11:28 1999
@@ -103,11 +103,11 @@
goto defective;
for (i=0; i<noptions; i++) {
- if (options[i].option_id = opt_id) {
+ if (options[i].option_id == opt_id) {
options[i].length = field_length;
options[i].data = ptr;
+ break;
}
- break;
}
ptr += field_length;
>Audit-Trail:
>Unformatted:
More information about the krb5-bugs
mailing list