X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b1ab9ed8d0e0f1c3b66d7daa8fd5564444c56195..e3d3b979fd185d8303f28a937baa53a187fb8c7d:/libsecurity_cdsa_utilities/lib/context.h?ds=sidebyside diff --git a/libsecurity_cdsa_utilities/lib/context.h b/libsecurity_cdsa_utilities/lib/context.h index 5fdd9725..0df2e5bd 100644 --- a/libsecurity_cdsa_utilities/lib/context.h +++ b/libsecurity_cdsa_utilities/lib/context.h @@ -74,7 +74,7 @@ public: AttributeType = typ; // attribute component pointers are stupidly non-const; allow const input Attribute.String = const_cast(reinterpret_cast(&value)); - AttributeLength = size ? size : sizeof(T); + AttributeLength = (uint32_t) (size ? size : sizeof(T)); } Attr(CSSM_ATTRIBUTE_TYPE typ, uint32 value) @@ -339,7 +339,7 @@ public: assert(slot < slotCount); // check overflow Attr &attribute = attributes[slot++]; attribute.AttributeType = type; - attribute.AttributeLength = size(p); //@@@ needed? how/when/what for? + attribute.AttributeLength = (uint32)size(p); //@@@ needed? how/when/what for? T *tmp = const_cast(p); attribute = walk(copier, tmp); }