/base/update/updater/services/package/pkg_algorithm/ |
D | pkg_algo_lz4.cpp | 75 size_t srcOffset = context.srcOffset; in Pack() local 86 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Pack() 100 srcOffset += readLen; in Pack() 103 PKG_CHECK(srcOffset - context.srcOffset == context.unpackedSize, in Pack() 104 return ret, "original size error %zu %zu", srcOffset, context.unpackedSize); in Pack() 121 size_t srcOffset = context.srcOffset; in Unpack() local 130 int32_t ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Unpack() 138 srcOffset += sizeof(uint32_t); in Unpack() 142 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Unpack() 154 srcOffset += readLen; in Unpack() [all …]
|
D | pkg_algorithm.cpp | 71 size_t srcOffset = context.srcOffset; in Pack() local 76 ret = ReadData(inStream, srcOffset, buffer, remainSize, readLen); in Pack() 89 srcOffset += readLen; in Pack() 98 if (srcOffset - context.srcOffset != context.unpackedSize) { in Pack() 99 PKG_LOGE("original size error %zu %zu", srcOffset, context.unpackedSize); in Pack() 117 size_t srcOffset = context.srcOffset; in Unpack() local 122 ret = ReadData(inStream, srcOffset, buffer, remainSize, readLen); in Unpack() 135 srcOffset += readLen; in Unpack() 148 context.unpackedSize = srcOffset - context.srcOffset; in Unpack()
|
D | pkg_algorithm.h | 24 size_t srcOffset; member 26 PkgContextOffset(size_t srcOffset, size_t destOffset) in PkgContextOffset() 28 this->srcOffset = srcOffset; in PkgContextOffset() 44 size_t srcOffset; member 54 this->srcOffset = offset.srcOffset; in PkgAlgorithmContext()
|
D | pkg_algo_deflate.cpp | 69 size_t srcOffset = context.srcOffset; in Pack() local 76 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in Pack() 80 srcOffset += readLen; in Pack() 89 PKG_CHECK(srcOffset == context.unpackedSize, return PKG_INVALID_PKG_FORMAT, in Pack() 90 "original size error %zu %zu", srcOffset, context.unpackedSize); in Pack() 110 size_t srcOffset = context.srcOffset; in UnpackCalculate() local 115 ret = ReadData(inStream, srcOffset, inBuffer, remainCompressedSize, readLen); in UnpackCalculate() 119 srcOffset += readLen; in UnpackCalculate()
|
D | pkg_algo_lz4.h | 55 const PkgStreamPtr inStream, size_t &nextToRead, size_t &srcOffset);
|
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/ |
D | cm_ipc_client_serialization.c | 24 int32_t GetUint32FromBuffer(uint32_t *value, const struct CmBlob *srcBlob, uint32_t *srcOffset) in GetUint32FromBuffer() argument 26 if ((*srcOffset > srcBlob->size) || (srcBlob->size - *srcOffset < sizeof(uint32_t))) { in GetUint32FromBuffer() 30 if (memcpy_s(value, sizeof(uint32_t), srcBlob->data + *srcOffset, sizeof(uint32_t)) != EOK) { in GetUint32FromBuffer() 34 *srcOffset += sizeof(uint32_t); in GetUint32FromBuffer() 38 int32_t CmGetBlobFromBuffer(struct CmBlob *blob, const struct CmBlob *srcBlob, uint32_t *srcOffset) in CmGetBlobFromBuffer() argument 40 if ((*srcOffset > srcBlob->size) || ((srcBlob->size - *srcOffset) < sizeof(uint32_t))) { in CmGetBlobFromBuffer() 44 uint32_t size = *((uint32_t *)(srcBlob->data + *srcOffset)); in CmGetBlobFromBuffer() 45 if (ALIGN_SIZE(size) > srcBlob->size - *srcOffset - sizeof(uint32_t)) { in CmGetBlobFromBuffer() 50 *srcOffset += sizeof(blob->size); in CmGetBlobFromBuffer() 51 blob->data = (uint8_t *)(srcBlob->data + *srcOffset); in CmGetBlobFromBuffer() [all …]
|
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/ |
D | hks_ipc_serialization.c | 73 …ic int32_t GetUint32FromBuffer(uint32_t *value, const struct HksBlob *srcBlob, uint32_t *srcOffset) in GetUint32FromBuffer() argument 75 if ((*srcOffset > srcBlob->size) || (srcBlob->size - *srcOffset < sizeof(*value))) { in GetUint32FromBuffer() 79 *value = *((uint32_t *)(srcBlob->data + *srcOffset)); in GetUint32FromBuffer() 80 *srcOffset += sizeof(*value); in GetUint32FromBuffer() 84 …int32_t GetBlobFromBuffer(struct HksBlob *blob, const struct HksBlob *srcBlob, uint32_t *srcOffset) in GetBlobFromBuffer() argument 86 if ((*srcOffset > srcBlob->size) || ((srcBlob->size - *srcOffset) < sizeof(blob->size))) { in GetBlobFromBuffer() 90 uint32_t size = *((uint32_t *)(srcBlob->data + *srcOffset)); in GetBlobFromBuffer() 94 if (ALIGN_SIZE(size) > (srcBlob->size - *srcOffset - sizeof(blob->size))) { in GetBlobFromBuffer() 98 *srcOffset += sizeof(blob->size); in GetBlobFromBuffer() 99 blob->data = (uint8_t *)(srcBlob->data + *srcOffset); in GetBlobFromBuffer() [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/ipc/ |
D | hks_ipc_serialization.c | 70 …ic int32_t GetUint32FromBuffer(uint32_t *value, const struct HksBlob *srcBlob, uint32_t *srcOffset) in GetUint32FromBuffer() argument 72 if ((*srcOffset > srcBlob->size) || (srcBlob->size - *srcOffset < sizeof(uint32_t))) { in GetUint32FromBuffer() 76 (void)memcpy_s(value, sizeof(*value), srcBlob->data + *srcOffset, sizeof(uint32_t)); in GetUint32FromBuffer() 78 *srcOffset += sizeof(uint32_t); in GetUint32FromBuffer() 82 int32_t GetBlobFromBuffer(struct HksBlob *blob, const struct HksBlob *srcBlob, uint32_t *srcOffset) in GetBlobFromBuffer() argument 84 if ((*srcOffset > srcBlob->size) || ((srcBlob->size - *srcOffset) < sizeof(uint32_t))) { in GetBlobFromBuffer() 88 uint32_t size = *((uint32_t *)(srcBlob->data + *srcOffset)); in GetBlobFromBuffer() 92 if (ALIGN_SIZE(size) > srcBlob->size - *srcOffset - sizeof(uint32_t)) { in GetBlobFromBuffer() 97 *srcOffset += sizeof(blob->size); in GetBlobFromBuffer() 98 blob->data = (uint8_t *)(srcBlob->data + *srcOffset); in GetBlobFromBuffer() [all …]
|
D | hks_ipc_serialization.h | 26 int32_t GetBlobFromBuffer(struct HksBlob *blob, const struct HksBlob *srcBlob, uint32_t *srcOffset);
|
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include/ |
D | cm_ipc_client_serialization.h | 29 int32_t GetUint32FromBuffer(uint32_t *value, const struct CmBlob *srcBlob, uint32_t *srcOffset); 31 int32_t CmGetBlobFromBuffer(struct CmBlob *blob, const struct CmBlob *srcBlob, uint32_t *srcOffset);
|
/base/update/updater/services/package/pkg_package/ |
D | pkg_lz4file.cpp | 185 size_t srcOffset = 0; in LoadPackage() local 188 int32_t ret = pkgStream_->Read(buffer, srcOffset, buffer.length, readLen); in LoadPackage() 198 srcOffset += sizeof(PkgAlgorithmLz4::LZ4B_MAGIC_NUMBER); in LoadPackage() 209 ret = entry->DecodeHeader(buffer, 0, srcOffset, readLen); in LoadPackage()
|
D | pkg_gzipfile.cpp | 320 size_t srcOffset = 0; in LoadPackage() local 323 int32_t ret = pkgStream_->Read(buffer, srcOffset, buffer.length, readLen); in LoadPackage() 346 ret = entry->DecodeHeader(buffer, srcOffset, srcOffset, readLen); in LoadPackage() 347 srcOffset += readLen; in LoadPackage()
|
D | pkg_upgradefile.cpp | 272 size_t srcOffset = 0; in ReadComponents() local 274 while (srcOffset < tlv.length) { in ReadComponents() 277 ret = pkgStream_->Read(buffer, parsedLen + srcOffset, buffer.length, readLen); in ReadComponents() 289 ret = entry->DecodeHeader(headerBuff, parsedLen + srcOffset, dataOffset, decodeLen); in ReadComponents() 301 srcOffset += decodeLen; in ReadComponents() 308 parsedLen += srcOffset; in ReadComponents()
|