Skip Menu |
 

Subject: krb5-1.5: several (warning)fixes for spnego
This patch fixes some warnings in:
src/lib/gssapi/spnego/gssapiP_spnego.h (re-defined TWRITE_STR)
src/lib/gssapi/spnego/spnego_mech.c
(unused vars, signed/unsigned problems, may be used uninitialized)
--- src/lib/gssapi/spnego/gssapiP_spnego.h
+++ src/lib/gssapi/spnego/gssapiP_spnego.h 2006/06/20 09:11:44
@@ -117,10 +117,6 @@
};
const gss_OID_set_desc * const gss_mech_set_spnego = spnego_oidsets+0;

-#define TWRITE_STR(ptr, str, len) \
- memcpy((ptr), (char *)(str), (len)); \
- (ptr) += (len);
-
#ifdef DEBUG
#define dsyslog(a) syslog(LOG_DEBUG, a)
#else
--- src/lib/gssapi/spnego/spnego_mech.c
+++ src/lib/gssapi/spnego/spnego_mech.c 2006/06/20 09:25:57
@@ -1953,7 +1953,7 @@
OM_uint32 *req_flags)
{
int len;
- unsigned char *start = *buff_in;
+ /* unsigned char *start = *buff_in; */

if (**buff_in != (CONTEXT | 0x01))
return (0);
@@ -2079,8 +2079,8 @@
gss_buffer_t *mechListMIC)
{
unsigned char *ptr, *bufstart;
- int len, bytes;
- unsigned int tag;
+ int len;
+ unsigned int tag, bytes;

*negState = ACCEPT_DEFECTIVE_TOKEN;
*supportedMech = GSS_C_NO_OID;
@@ -2280,11 +2280,11 @@
int rspTokenSize = 0;
int mechListTokenSize = 0;
int micTokenSize = 0;
- int i;
+ /* int i; */
unsigned char *t;
unsigned char *ptr;
- unsigned char *MechListPtr = NULL;
- gss_buffer_desc MICbuff;
+ /* unsigned char *MechListPtr = NULL; */
+ /* gss_buffer_desc MICbuff; */

if (outbuf == GSS_C_NO_BUFFER)
return (-1);
@@ -2448,13 +2448,13 @@
send_token_flag sendtoken,
gss_buffer_t outbuf)
{
- int tlen;
- int ret;
- int NegTokenTargSize;
- int negresultTokenSize;
- int NegTokenSize;
- int rspTokenSize;
- int micTokenSize;
+ int tlen = 0;
+ int ret = 0;
+ int NegTokenTargSize = 0;
+ /* int negresultTokenSize = 0; */
+ int NegTokenSize = 0;
+ int rspTokenSize = 0;
+ int micTokenSize = 0;
int dataLen = 0;
unsigned char *t;
unsigned char *ptr;
From: tlyu@mit.edu
Subject: SVN Commit
Apply (modified) patches from Michael Calmer to fix some warnings.

* src/lib/gssapi/spnego/spnego_mech.c (get_req_flags): Remove
unused var.
(get_negTokenResp): Fix signedness bug.
(make_spnego_tokenInit_msg): Remove unused vars
(make_spnego_tokenTarg_msg): Initialize uninitialized vars.

* src/lib/gssapi/spnego/gssapiP_spnego.h: Delete TWRITE_STR.

Commit By: tlyu



Revision: 18198
Changed Files:
U trunk/src/lib/gssapi/spnego/gssapiP_spnego.h
U trunk/src/lib/gssapi/spnego/spnego_mech.c
From: tlyu@mit.edu
Subject: SVN Commit
pull up r18198 from trunk

r18198@cathode-dark-space: tlyu | 2006-06-22 14:36:16 -0400
ticket: 3905
tags: pullup

Apply (modified) patches from Michael Calmer to fix some warnings.

* src/lib/gssapi/spnego/spnego_mech.c (get_req_flags): Remove
unused var.
(get_negTokenResp): Fix signedness bug.
(make_spnego_tokenInit_msg): Remove unused vars
(make_spnego_tokenTarg_msg): Initialize uninitialized vars.

* src/lib/gssapi/spnego/gssapiP_spnego.h: Delete TWRITE_STR.


Commit By: tlyu



Revision: 18218
Changed Files:
U branches/krb5-1-5/src/lib/gssapi/spnego/gssapiP_spnego.h
U branches/krb5-1-5/src/lib/gssapi/spnego/spnego_mech.c