Home
last modified time | relevance | path

Searched refs:srcOffset (Results 1 – 17 of 17) sorted by relevance

/base/update/updater/services/package/pkg_algorithm/
Dpkg_algorithm.cpp71 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()
164 size_t srcOffset = context.srcOffset; in UnpackWithVerify() local
[all …]
Dpkg_algorithm.h24 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()
Dpkg_algo_lz4.cpp63 size_t srcOffset = context.srcOffset; in PackCalculate() local
77 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in PackCalculate()
100 srcOffset += readLen; in PackCalculate()
103 if (srcOffset - context.srcOffset != context.unpackedSize) { in PackCalculate()
104 PKG_LOGE("original size error %zu %zu", srcOffset, context.unpackedSize); in PackCalculate()
150 … int32_t ret = ReadData(inStream, unpackText.srcOffset, inBuffer, unpackText.packedSize, readLen); in UnpackCalculate()
163 unpackText.srcOffset += sizeof(uint32_t); in UnpackCalculate()
167 ret = ReadData(inStream, unpackText.srcOffset, inBuffer, unpackText.packedSize, readLen); in UnpackCalculate()
188 unpackText.srcOffset += readLen; in UnpackCalculate()
190 context.packedSize = unpackText.srcOffset - context.srcOffset; in UnpackCalculate()
[all …]
Dpkg_algo_deflate.cpp69 size_t srcOffset = context.srcOffset; in PackCalculate() local
76 ret = ReadData(inStream, srcOffset, inBuffer, remainSize, readLen); in PackCalculate()
83 srcOffset += readLen; in PackCalculate()
98 if (srcOffset != context.unpackedSize) { in PackCalculate()
99 PKG_LOGE("original size error %zu %zu", srcOffset, context.unpackedSize); in PackCalculate()
126 int32_t ret = ReadData(inStream, context.srcOffset, inBuffer, context.packedSize, readLen); in ReadUnpackData()
133 context.srcOffset += readLen; in ReadUnpackData()
Dpkg_algo_lz4.h69 const PkgStreamPtr inStream, size_t &nextToRead, size_t &srcOffset);
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/
Dcm_ipc_client_serialization.c24 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/services/huks_standard/huks_service/main/os_dependency/idl/ipc/
Dhks_ipc_serialization.c70 …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 …]
Dhks_ipc_serialization.h26 int32_t GetBlobFromBuffer(struct HksBlob *blob, const struct HksBlob *srcBlob, uint32_t *srcOffset);
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/
Dhks_ipc_serialization.c73 …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/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/include/
Dcm_ipc_client_serialization.h29 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/security/certificate_manager/test/unittest/module_test/src/
Dcm_log_test.cpp189 uint32_t srcOffset = sizeof(srcData) + 1; /* srcOffset invalid */ variable
190 int32_t ret = GetUint32FromBuffer(&value, &srcBlob, &srcOffset);
205 uint32_t srcOffset = sizeof(srcData) - 1; /* srcOffset invalid */ variable
206 int32_t ret = GetUint32FromBuffer(&value, &srcBlob, &srcOffset);
221 uint32_t srcOffset = sizeof(srcData) + 1; /* srcOffset invalid */ variable
222 int32_t ret = CmGetBlobFromBuffer(&blob, &srcBlob, &srcOffset);
237 uint32_t srcOffset = sizeof(srcData) - 1; /* srcOffset invalid */ variable
238 int32_t ret = CmGetBlobFromBuffer(&blob, &srcBlob, &srcOffset);
253 uint32_t srcOffset = 0; variable
254 int32_t ret = CmGetBlobFromBuffer(&blob, &srcBlob, &srcOffset);
/base/update/updater/services/package/pkg_package/
Dpkg_lz4file.cpp185 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()
Dpkg_gzipfile.cpp364 size_t srcOffset = 0; in LoadPackage() local
367 int32_t ret = pkgStream_->Read(buffer, srcOffset, buffer.length, readLen); in LoadPackage()
394 ret = entry->DecodeHeader(buffer, srcOffset, srcOffset, readLen); in LoadPackage()
395 srcOffset += readLen; in LoadPackage()
Dpkg_upgradefile.cpp594 …size_t ret = entry->DecodeHeader(headerBuff, parsedLen + info.srcOffset, info.dataOffset, decodeLe… in SaveEntry()
609 info.srcOffset += decodeLen; in SaveEntry()
647 info.srcOffset = 0; in ReadComponents()
650 while (info.srcOffset < tlv.length) { in ReadComponents()
653 … ret = pkgStream_->Read(compBuffer, parsedLen + info.srcOffset, compBuffer.length, info.readLen); in ReadComponents()
668 parsedLen += info.srcOffset; in ReadComponents()
Dpkg_upgradefile.h59 size_t srcOffset {};
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_rkc_rw.c85 int32_t ExtractFieldFromBuffer(const struct HksBlob *srcBlob, uint32_t *srcOffset, void *dest, uint… in ExtractFieldFromBuffer() argument
87 if (CheckBlob(srcBlob) != HKS_SUCCESS || srcOffset == NULL || dest == NULL || destSize == 0) { in ExtractFieldFromBuffer()
91 if (srcBlob->size < *srcOffset) { in ExtractFieldFromBuffer()
96 if (srcBlob->size - *srcOffset < destSize) { in ExtractFieldFromBuffer()
101 (void)memcpy_s(dest, destSize, srcBlob->data + *srcOffset, destSize); in ExtractFieldFromBuffer()
102 *srcOffset += destSize; in ExtractFieldFromBuffer()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/include/
Dhks_rkc_rw.h110 int32_t ExtractFieldFromBuffer(const struct HksBlob *srcBlob, uint32_t *srcOffset, void *dest, uint…