diff options
author | Simo Sorce <simo@redhat.com> | 2013-04-03 14:29:51 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-04-03 16:39:11 -0400 |
commit | e97ff3ecad3c4fbccd74e74de83ff75913ed2f4c (patch) | |
tree | 361d947dc270f1cef7983c79130694b25a25e845 | |
parent | 2a7d19056d58344496fb24d90d0d02915ea83798 (diff) | |
download | gss-proxy-e97ff3ecad3c4fbccd74e74de83ff75913ed2f4c.tar.gz gss-proxy-e97ff3ecad3c4fbccd74e74de83ff75913ed2f4c.tar.xz gss-proxy-e97ff3ecad3c4fbccd74e74de83ff75913ed2f4c.zip |
Fix infinite loop due to bad sign of variable
Change the i variable to be a signed integer ot the loop will never end because
and unsigned integer decremented past 0 simply wraps to a very big integer.
The condition that would break the loop can never be true therefore the code
would loop forever until eventually a double free would cause a crash.
Found by Coverity.
Signed-off-by: Simo Sorce <simo@redhat.com>
-rw-r--r-- | proxy/src/client/gpm_import_and_canon_name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/proxy/src/client/gpm_import_and_canon_name.c b/proxy/src/client/gpm_import_and_canon_name.c index ebc987f..68dc6ce 100644 --- a/proxy/src/client/gpm_import_and_canon_name.c +++ b/proxy/src/client/gpm_import_and_canon_name.c @@ -296,8 +296,8 @@ OM_uint32 gpm_inquire_name(OM_uint32 *minor_status, gss_buffer_set_t *attrs) { gss_buffer_set_t xattrs = GSS_C_NO_BUFFER_SET; - uint32_t i; int ret; + int i; *minor_status = 0; |