More Heimdal portability cleanups
[mech_eap.orig] / util_ordering.c
index 3427881..9d74697 100644 (file)
  */
 
 /*
- * $Id: util_ordering.c 23457 2009-12-08 00:04:48Z tlyu $
- */
-
-/*
- * functions to check sequence numbers for replay and sequencing
+ * Functions to check sequence numbers for replay and sequencing
  */
 
 #include "gssapiP_eap.h"
@@ -264,7 +260,7 @@ sequenceExternalize(OM_uint32 *minor,
                     size_t *lenremain)
 {
     if (*lenremain < sizeof(queue)) {
-        *minor = ERANGE;
+        *minor = GSSEAP_WRONG_SIZE;
         return GSS_S_FAILURE;
     }
     memcpy(*buf, vqueue, sizeof(queue));
@@ -283,7 +279,7 @@ sequenceInternalize(OM_uint32 *minor,
     void *q;
 
     if (*lenremain < sizeof(queue)) {
-        *minor = ERANGE;
+        *minor = GSSEAP_TOK_TRUNC;
         return GSS_S_DEFECTIVE_TOKEN;
     }