projects
/
mech_eap.orig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove debugging statement
[mech_eap.orig]
/
wrap_size_limit.c
diff --git
a/wrap_size_limit.c
b/wrap_size_limit.c
index
615010f
..
aadf1b4
100644
(file)
--- a/
wrap_size_limit.c
+++ b/
wrap_size_limit.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
0
, JANET(UK)
+ * Copyright (c) 201
1
, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-30,6
+30,10
@@
* SUCH DAMAGE.
*/
* SUCH DAMAGE.
*/
+/*
+ * Message protection services: determine maximum input size.
+ */
+
#include "gssapiP_eap.h"
OM_uint32
#include "gssapiP_eap.h"
OM_uint32
@@
-43,15
+47,18
@@
gss_wrap_size_limit(OM_uint32 *minor,
gss_iov_buffer_desc iov[4];
OM_uint32 major, overhead;
gss_iov_buffer_desc iov[4];
OM_uint32 major, overhead;
- *minor = 0;
+ if (ctx == GSS_C_NO_CONTEXT) {
+ *minor = EINVAL;
+ return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT;
+ }
- if (ctx == GSS_C_NO_CONTEXT)
- return GSS_S_NO_CONTEXT;
+ *minor = 0;
GSSEAP_MUTEX_LOCK(&ctx->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
major = GSS_S_NO_CONTEXT;
GSSEAP_MUTEX_LOCK(&ctx->mutex);
if (!CTX_IS_ESTABLISHED(ctx)) {
major = GSS_S_NO_CONTEXT;
+ *minor = GSSEAP_CONTEXT_INCOMPLETE;
goto cleanup;
}
goto cleanup;
}