+Tue Mar 7 20:14:53 1995 Keith Vetter (keithv@fusion.com)
+
+ * disp_maj.c: added casts on int->long assignments.
+ * util_can.c: made to work with PC winsockets.
+ * util_dup.c: added system include for prototype info.
+ * util_tok.c: int/long problems.
+ * gssapip_.h: added casts on int->char assignments.
+
Tue Feb 28 00:25:58 1995 John Gilmore (gnu at toad.com)
* gssapi.h: Avoid <krb5/...> includes.
*/
#include "gssapiP_generic.h"
+#include <string.h>
/* This code has knowledge of the min and max errors of each type
within the gssapi major status */
if (!tmp) {
/* bogon input - there should be something left */
- *minor_status = G_BAD_MSG_CTX;
+ *minor_status = (OM_uint32) G_BAD_MSG_CTX;
return(GSS_S_FAILURE);
}
/* compute the bit offset */
/*SUPPRESS 570*/
- for (bit=0; (1<<bit) != LSBGET(tmp); bit++) ;
+ for (bit=0; (((OM_uint32) 1)<<bit) != LSBGET(tmp); bit++) ;
/* print it */
if (ret = display_bit(minor_status, bit, status_string))
return(ret);
/* compute the new status_value/message_context */
- status_value -= 1<<bit;
+ status_value -= ((OM_uint32) 1)<<bit;
if (status_value) {
*message_context = bit+3;
things */
#define TWRITE_INT(ptr, num, bigend) \
- (ptr)[0] = (bigend)?((num)>>24):((num)&0xff); \
- (ptr)[1] = (bigend)?(((num)>>16)&0xff):(((num)>>8)&0xff); \
- (ptr)[2] = (bigend)?(((num)>>8)&0xff):(((num)>>16)&0xff); \
- (ptr)[3] = (bigend)?((num)&0xff):((num)>>24); \
+ (ptr)[0] = (char) ((bigend)?((num)>>24):((num)&0xff)); \
+ (ptr)[1] = (char) ((bigend)?(((num)>>16)&0xff):(((num)>>8)&0xff)); \
+ (ptr)[2] = (char) ((bigend)?(((num)>>8)&0xff):(((num)>>16)&0xff)); \
+ (ptr)[3] = (char) ((bigend)?((num)&0xff):((num)>>24)); \
(ptr) += 4;
#define TREAD_INT(ptr, num, bigend) \
*/
/* This file could be OS specific */
+#define NEED_SOCKETS
#include "gssapiP_generic.h"
-#ifndef _MSDOS
+
#include <sys/types.h>
+#ifndef _WINSOCKAPI_
#include <sys/socket.h>
#include <netdb.h>
+#endif
#include <ctype.h>
+#include <string.h>
char * INTERFACE
g_canonicalize_host(hostname)
return(canon);
}
-#endif
*/
#include "gssapiP_generic.h"
+#include <string.h>
char * INTERFACE g_strdup(str)
char *str;
unsigned int body_size;
{
/* set body_size to sequence contents size */
- body_size += 4 + mech->length;
+ body_size += 4 + (int) mech->length; /* NEED overflow check */
return(1 + der_length_size(body_size) + body_size);
}
return(0);
toid.length = *(*buf)++;
- if ((toksize-=toid.length) < 0)
+ if ((toid.length & VALID_INT_BITS) != toid.length) /* Overflow??? */
+ return(0);
+ if ((toksize-= (int) toid.length) < 0)
return(0);
toid.elements = *buf;
(*buf)+=toid.length;