projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aff112d
)
don't include attr length in exported composite names
author
Luke Howard
<lukeh@padl.com>
Tue, 12 Oct 2010 01:38:53 +0000
(12:38 +1100)
committer
Luke Howard
<lukeh@padl.com>
Tue, 12 Oct 2010 01:38:53 +0000
(12:38 +1100)
util_name.c
patch
|
blob
|
history
diff --git
a/util_name.c
b/util_name.c
index
c920d65
..
575e3c3
100644
(file)
--- a/
util_name.c
+++ b/
util_name.c
@@
-299,13
+299,8
@@
gssEapImportNameInternal(OM_uint32 *minor,
if (flags & EXPORT_NAME_FLAG_COMPOSITE) {
gss_buffer_desc buf;
if (flags & EXPORT_NAME_FLAG_COMPOSITE) {
gss_buffer_desc buf;
- CHECK_REMAIN(4);
- buf.length = load_uint32_be(p);
- UPDATE_REMAIN(4);
-
- CHECK_REMAIN(buf.length);
+ buf.length = remain;
buf.value = p;
buf.value = p;
- UPDATE_REMAIN(buf.length);
major = gssEapImportAttrContext(minor, &buf, name);
if (GSS_ERROR(major))
major = gssEapImportAttrContext(minor, &buf, name);
if (GSS_ERROR(major))
@@
-423,7
+418,7
@@
gssEapExportNameInternal(OM_uint32 *minor,
major = gssEapExportAttrContext(minor, name, &attrs);
if (GSS_ERROR(major))
goto cleanup;
major = gssEapExportAttrContext(minor, name, &attrs);
if (GSS_ERROR(major))
goto cleanup;
- exportedNameLen +=
4 +
attrs.length;
+ exportedNameLen += attrs.length;
}
exportedName->value = GSSEAP_MALLOC(exportedNameLen);
}
exportedName->value = GSSEAP_MALLOC(exportedNameLen);
@@
-462,11
+457,12
@@
gssEapExportNameInternal(OM_uint32 *minor,
p += krbNameLen;
if (flags & EXPORT_NAME_FLAG_COMPOSITE) {
p += krbNameLen;
if (flags & EXPORT_NAME_FLAG_COMPOSITE) {
- store_uint32_be(attrs.length, p);
- memcpy(&p[4], attrs.value, attrs.length);
- p += 4 + attrs.length;
+ memcpy(p, attrs.value, attrs.length);
+ p += attrs.length;
}
}
+ assert(p == (unsigned char *)exportedName->value + exportedNameLen);
+
*minor = 0;
major = GSS_S_COMPLETE;
*minor = 0;
major = GSS_S_COMPLETE;