]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix gss_str_to_oid and gss_oid_to_str edge cases
authorGreg Hudson <ghudson@mit.edu>
Tue, 1 Jan 2013 05:23:43 +0000 (00:23 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 1 Jan 2013 22:41:49 +0000 (17:41 -0500)
commit9b702abe222d4b279d5869f96f09074452478b1e
tree0d88e593e5fead5e74f09b12629ca64242749c11
parent379d39c17b8930718e98185a5b32a0f7f3e3b4b6
Fix gss_str_to_oid and gss_oid_to_str edge cases

Neither function correctly handled OIDs whose second arc exceeds 47
(theoretically possible if the first arc is 2).  gss_str_to_oid had
additional problems: it used scanf, it didn't consistently protect
against read overrun if the input buffer wasn't null-terminated, and
it could get confused by + or - characters in the first two arcs.  Fix
gss_oid_to_str and rewrite gss_str_to_oid.

Also add a test program.

ticket: 7524 (new)
.gitignore
src/lib/gssapi/generic/oid_ops.c
src/tests/gssapi/Makefile.in
src/tests/gssapi/t_oid.c [new file with mode: 0644]