X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b1ab9ed8d0e0f1c3b66d7daa8fd5564444c56195..420ff9d9379a8d93f2c90f026a797bdea1eb4517:/libsecurityd/lib/SharedMemoryClient.cpp diff --git a/libsecurityd/lib/SharedMemoryClient.cpp b/libsecurityd/lib/SharedMemoryClient.cpp index 2f1ada17..923767dc 100644 --- a/libsecurityd/lib/SharedMemoryClient.cpp +++ b/libsecurityd/lib/SharedMemoryClient.cpp @@ -98,7 +98,7 @@ void SharedMemoryClient::ReadData (void* buffer, SegmentOffsetType length) u_int8_t* bptr = (u_int8_t*) buffer; - SegmentOffsetType bytesToEnd = mDataMax - mDataPtr; + SegmentOffsetType bytesToEnd = (SegmentOffsetType)(mDataMax - mDataPtr); // figure out how many bytes we can read SegmentOffsetType bytesToRead = (length <= bytesToEnd) ? length : bytesToEnd;