/base/telephony/sms_mms/test/fuzztest/wappushbuffer_fuzzer/ |
D | wappushbuffer_fuzzer.cpp | 34 auto decodeBuffer = std::make_shared<SmsWapPushBuffer>(); in WapPushBuffer() local 35 if (decodeBuffer == nullptr) { in WapPushBuffer() 39 decodeBuffer->ReadDataBuffer(desLen); in WapPushBuffer() 42 decodeBuffer->WriteDataBuffer(std::move(inBuff), desLen); in WapPushBuffer() 43 decodeBuffer->GetCurPosition(); in WapPushBuffer() 44 decodeBuffer->GetSize(); in WapPushBuffer() 47 decodeBuffer->PeekOneByte(uint8tValue); in WapPushBuffer() 48 decodeBuffer->IncreasePointer(desLen); in WapPushBuffer() 49 decodeBuffer->DecreasePointer(desLen); in WapPushBuffer() 50 decodeBuffer->DecodeUintvar(desLen, desLen); in WapPushBuffer() [all …]
|
/base/telephony/sms_mms/services/ |
D | sms_wap_push_content_type.cpp | 74 bool SmsWapPushContentType::DecodeContentType(SmsWapPushBuffer &decodeBuffer, int32_t &contentLengt… in DecodeContentType() argument 78 if (decodeBuffer.DecodeIsShortInt()) { in DecodeContentType() 80 if (!decodeBuffer.GetOneByte(oneByte)) { in DecodeContentType() 89 if (decodeBuffer.DecodeIsString()) { in DecodeContentType() 92 decodeBuffer.DecodeText(sType, len); in DecodeContentType() 98 if (!DecodeCTGeneralForm(decodeBuffer, contentLength)) { in DecodeContentType() 121 bool SmsWapPushContentType::DecodeCTGeneralForm(SmsWapPushBuffer &decodeBuffer, int32_t &contentLen… in DecodeCTGeneralForm() argument 126 if (!decodeBuffer.DecodeIsValueLength()) { in DecodeCTGeneralForm() 133 if (!decodeBuffer.DecodeValueLengthReturnLen(valueLength, returnLength)) { in DecodeCTGeneralForm() 140 if (!decodeBuffer.PeekOneByte(oneByte)) { in DecodeCTGeneralForm() [all …]
|
D | sms_wap_push_handler.cpp | 39 bool SmsWapPushHandler::DecodeWapPushPduData(SmsWapPushBuffer &decodeBuffer, uint32_t startPos, uin… in DecodeWapPushPduData() argument 45 headerBuffer = decodeBuffer.ReadDataBuffer(startHeader, headerLength); in DecodeWapPushPduData() 55 dataLength = decodeBuffer.GetSize(); in DecodeWapPushPduData() 57 dataLength = decodeBuffer.GetSize() - startHeader - headerLength; in DecodeWapPushPduData() 61 pduBuffer = decodeBuffer.ReadDataBuffer(posData, dataLength); in DecodeWapPushPduData() 74 SmsWapPushBuffer decodeBuffer; in DecodeWapPushPdu() local 75 if (!decodeBuffer.WriteRawStringBuffer(wapPdu)) { in DecodeWapPushPdu() 79 if (!DecodePushType(decodeBuffer)) { in DecodeWapPushPdu() 86 if (!decodeBuffer.DecodeUintvar(headerLength, count)) { in DecodeWapPushPdu() 92 uint32_t startHeader = decodeBuffer.GetCurPosition(); in DecodeWapPushPdu() [all …]
|
/base/telephony/sms_mms/frameworks/native/mms/src/ |
D | mms_content_type.cpp | 62 bool MmsContentType::DecodeMmsContentType(MmsDecodeBuffer &decodeBuffer, int32_t &contentLength) in DecodeMmsContentType() argument 66 if (decodeBuffer.DecodeIsShortInt()) { in DecodeMmsContentType() 67 if (!decodeBuffer.GetOneByte(oneByte)) { in DecodeMmsContentType() 76 if (decodeBuffer.DecodeIsString()) { in DecodeMmsContentType() 79 decodeBuffer.DecodeText(sType, len); in DecodeMmsContentType() 85 if (!DecodeMmsCTGeneralForm(decodeBuffer, contentLength)) { in DecodeMmsContentType() 108 bool MmsContentType::DecodeMmsCTGeneralForm(MmsDecodeBuffer &decodeBuffer, int32_t &contentLength) in DecodeMmsCTGeneralForm() argument 113 if (!decodeBuffer.DecodeIsValueLength()) { in DecodeMmsCTGeneralForm() 120 if (!decodeBuffer.DecodeValueLengthReturnLen(valueLength, returnLength)) { in DecodeMmsCTGeneralForm() 127 if (!decodeBuffer.PeekOneByte(oneByte)) { in DecodeMmsCTGeneralForm() [all …]
|
D | mms_body_part_header.cpp | 56 bool MmsBodyPartHeader::DecodeContentLocation(MmsDecodeBuffer &decodeBuffer, uint32_t &Len) in DecodeContentLocation() argument 60 if (!decodeBuffer.DecodeText(sTmp, Len)) { in DecodeContentLocation() 77 bool MmsBodyPartHeader::DecodeContentId(MmsDecodeBuffer &decodeBuffer, uint32_t &Len) in DecodeContentId() argument 81 if (!decodeBuffer.DecodeQuotedText(sTmp, Len)) { in DecodeContentId() 102 bool MmsBodyPartHeader::DecodeContentDisposition(MmsDecodeBuffer &decodeBuffer, uint32_t &Len) in DecodeContentDisposition() argument 106 if (!decodeBuffer.DecodeUintvar(dispositionLength, count)) { in DecodeContentDisposition() 111 uint32_t beginPostion = decodeBuffer.GetCurPosition(); in DecodeContentDisposition() 113 if (!decodeBuffer.GetOneByte(oneByte)) { in DecodeContentDisposition() 132 if (!decodeBuffer.DecreasePointer(1)) { in DecodeContentDisposition() 138 if (!decodeBuffer.DecodeText(strTmp, tmpLen)) { in DecodeContentDisposition() [all …]
|
D | mms_encode_string.cpp | 45 bool MmsEncodeString::DecodeEncodeString(MmsDecodeBuffer &decodeBuffer) in DecodeEncodeString() argument 50 if (!decodeBuffer.PeekOneByte(oneByte)) { in DecodeEncodeString() 57 decodeBuffer.IncreasePointer(1); in DecodeEncodeString() 63 if (!decodeBuffer.DecodeValueLength(valLength_)) { in DecodeEncodeString() 68 if (!decodeBuffer.DecodeInteger(charset)) { in DecodeEncodeString() 76 if (!decodeBuffer.DecodeText(strEncodeString_, len)) { in DecodeEncodeString()
|
D | mms_body_part.cpp | 97 bool MmsBodyPart::DecodePart(MmsDecodeBuffer &decodeBuffer) in DecodePart() argument 102 if (!decodeBuffer.DecodeUintvar(headerLength, length)) { in DecodePart() 106 if (!decodeBuffer.DecodeUintvar(bodyLength, length)) { in DecodePart() 111 if (!bodyPartContentType_.DecodeMmsContentType(decodeBuffer, contentLength)) { in DecodePart() 122 if (!DecodePartHeader(decodeBuffer, headerLen_ - static_cast<uint32_t>(contentLength))) { in DecodePart() 126 if (!DecodePartBody(decodeBuffer, bodyLen_)) { in DecodePart() 146 bool MmsBodyPart::DecodePartHeader(MmsDecodeBuffer &decodeBuffer, uint32_t headerLen) in DecodePartHeader() argument 155 if (!decodeBuffer.PeekOneByte(oneByte)) { in DecodePartHeader() 160 if (!mmsBodyPartHeader_.DecodeWellKnownHeader(decodeBuffer, headerLen)) { in DecodePartHeader() 165 if (!mmsBodyPartHeader_.DecodeApplicationHeader(decodeBuffer, headerLen)) { in DecodePartHeader() [all …]
|
D | mms_body.cpp | 40 bool MmsBody::DecodeMultipart(MmsDecodeBuffer &decodeBuffer) in DecodeMultipart() argument 44 if (!decodeBuffer.DecodeUintvar(nEntries, length)) { in DecodeMultipart() 51 if (!bodyPart.DecodePart(decodeBuffer)) { in DecodeMultipart() 61 bool MmsBody::DecodeMmsBody(MmsDecodeBuffer &decodeBuffer, MmsHeader &header) in DecodeMmsBody() argument 84 return DecodeMultipart(decodeBuffer); in DecodeMmsBody()
|
D | mms_msg.cpp | 30 MmsDecodeBuffer decodeBuffer; in DecodeMsg() local 31 if (!decodeBuffer.WriteBufferFromFile(mmsFilePathName)) { in DecodeMsg() 35 if (!mmsHeader_.DecodeMmsHeader(decodeBuffer)) { in DecodeMsg() 39 if (!mmsBody_.DecodeMmsBody(decodeBuffer, mmsHeader_)) { in DecodeMsg() 48 MmsDecodeBuffer decodeBuffer; in DecodeMsg() local 49 if (!decodeBuffer.WriteDataBuffer(std::move(inBuff), inLen)) { in DecodeMsg() 53 if (!mmsHeader_.DecodeMmsHeader(decodeBuffer)) { in DecodeMsg() 57 if (!mmsBody_.DecodeMmsBody(decodeBuffer, mmsHeader_)) { in DecodeMsg()
|
D | mms_header.cpp | 159 bool MmsHeader::DecodeMmsHeader(MmsDecodeBuffer &decodeBuffer) in DecodeMmsHeader() argument 165 while (decodeBuffer.GetOneByte(oneByte)) { in DecodeMmsHeader() 170 if (fun != nullptr && !(this->*fun)(fieldCode, decodeBuffer, len)) { in DecodeMmsHeader() 179 DecodeMmsMsgUnKnownField(decodeBuffer); in DecodeMmsHeader() 766 bool MmsHeader::DecodeMmsMsgUnKnownField(MmsDecodeBuffer &decodeBuffer) in DecodeMmsMsgUnKnownField() argument 771 if (!decodeBuffer.GetOneByte(oneByte)) { in DecodeMmsMsgUnKnownField() 776 decodeBuffer.DecreasePointer(1); in DecodeMmsMsgUnKnownField()
|
/base/telephony/sms_mms/services/include/ |
D | sms_wap_push_handler.h | 31 bool DecodeWapPushPduData(SmsWapPushBuffer &decodeBuffer, uint32_t startPos, uint32_t len); 33 bool DecodePushType(SmsWapPushBuffer &decodeBuffer); 35 bool DecodeXWapApplicationField(SmsWapPushBuffer &decodeBuffer, std::string &strWapAppId); 36 bool DecodeXWapApplication(SmsWapPushBuffer &decodeBuffer, uint32_t headersLen); 37 bool DecodeXWapApplicationValue(SmsWapPushBuffer &decodeBuffer, std::string &strWapAppId); 38 bool DecodeXWapAbandonHeaderValue(SmsWapPushBuffer &decodeBuffer);
|
D | sms_wap_push_content_type.h | 250 bool DecodeContentType(SmsWapPushBuffer &decodeBuffer, int32_t &len); 251 bool DecodeCTGeneralForm(SmsWapPushBuffer &decodeBuffer, int32_t &contentLength); 252 bool DecodeParameter(SmsWapPushBuffer &decodeBuffer, int32_t valueLength); 253 bool DecodeTextField(SmsWapPushBuffer &decodeBuffer, uint8_t field, int32_t &valueLength); 254 bool DecodeCharsetField(SmsWapPushBuffer &decodeBuffer, int32_t &valueLength); 255 bool DecodeTypeField(SmsWapPushBuffer &decodeBuffer, int32_t &valueLength);
|
/base/telephony/sms_mms/frameworks/native/mms/include/ |
D | mms_body_part_header.h | 46 bool DecodeWellKnownHeader(MmsDecodeBuffer &decodeBuffer, uint32_t &headerLen); 47 bool DecodeApplicationHeader(MmsDecodeBuffer &decodeBuffer, uint32_t &headerLen); 48 bool DecodeContentLocation(MmsDecodeBuffer &decodeBuffer, uint32_t &Len); 49 bool DecodeContentId(MmsDecodeBuffer &decodeBuffer, uint32_t &Len); 50 bool DecodeContentDisposition(MmsDecodeBuffer &decodeBuffer, uint32_t &Len); 51 …bool DecodeDispositionParameter(MmsDecodeBuffer &decodeBuffer, uint32_t dispLen, uint32_t beginPos…
|
D | mms_content_type.h | 213 bool DecodeMmsContentType(MmsDecodeBuffer &decodeBuffer, int32_t &len); 214 bool DecodeMmsCTGeneralForm(MmsDecodeBuffer &decodeBuffer, int32_t &contentLength); 215 bool DecodeParameter(MmsDecodeBuffer &decodeBuffer, int32_t valueLength); 216 bool DecodeTextField(MmsDecodeBuffer &decodeBuffer, uint8_t field, int32_t &valueLength); 217 bool DecodeCharsetField(MmsDecodeBuffer &decodeBuffer, int32_t &valueLength); 218 bool DecodeTypeField(MmsDecodeBuffer &decodeBuffer, int32_t &valueLength);
|
D | mms_body_part.h | 32 bool DecodePartHeader(MmsDecodeBuffer &decodeBuffer, uint32_t headerLen); 33 bool DecodePart(MmsDecodeBuffer &decodeBuffer); // main entry 34 bool DecodePartBody(MmsDecodeBuffer &decodeBuffer, uint32_t bodyLength);
|
D | mms_body.h | 34 bool DecodeMmsBody(MmsDecodeBuffer &decodeBuffer, MmsHeader &header); 35 bool DecodeMultipart(MmsDecodeBuffer &decodeBuffer);
|
D | mms_encode_string.h | 32 bool DecodeEncodeString(MmsDecodeBuffer &decodeBuffer);
|
D | mms_header.h | 34 bool DecodeMmsHeader(MmsDecodeBuffer &decodeBuffer); 66 bool DecodeMmsMsgUnKnownField(MmsDecodeBuffer &decodeBuffer);
|
/base/telephony/sms_mms/test/gtest/ |
D | zero_branch_test.cpp | 158 MmsDecodeBuffer decodeBuffer; variable 171 EXPECT_TRUE(mmsHeader->DecodeMmsHeader(decodeBuffer)); 259 MmsDecodeBuffer decodeBuffer; variable 269 EXPECT_FALSE(mmsHeader->DecodeMmsMsgType(1, decodeBuffer, data)); 270 EXPECT_FALSE(mmsHeader->DecodeMmsMsgType(MMS_BCC, decodeBuffer, data)); 271 EXPECT_FALSE(mmsHeader->DecodeFieldAddressModelValue(1, decodeBuffer, data)); 272 EXPECT_TRUE(mmsHeader->DecodeFieldAddressModelValue(MMS_BCC, decodeBuffer, data)); 273 EXPECT_FALSE(mmsHeader->DecodeFieldOctetValue(1, decodeBuffer, data)); 274 EXPECT_FALSE(mmsHeader->DecodeFieldLongValue(1, decodeBuffer, data)); 275 EXPECT_FALSE(mmsHeader->DecodeFieldIntegerValue(1, decodeBuffer, data)); [all …]
|
D | sms_mms_gtest.cpp | 2065 MmsDecodeBuffer decodeBuffer; variable 2071 mmsBodyPartHeader.DecodeContentLocation(decodeBuffer, len); 2072 mmsBodyPartHeader.DecodeContentId(decodeBuffer, len); 2073 mmsBodyPartHeader.DecodeContentDisposition(decodeBuffer, len); 2074 mmsBodyPartHeader.DecodeDispositionParameter(decodeBuffer, lenMax, len); 2075 mmsBodyPartHeader.DecodeDispositionParameter(decodeBuffer, lenErr, len); 2076 mmsBodyPartHeader.DecodeWellKnownHeader(decodeBuffer, len); 2077 mmsBodyPartHeader.DecodeApplicationHeader(decodeBuffer, len); 2170 MmsDecodeBuffer decodeBuffer; variable 2176 mmsContentType.DecodeMmsContentType(decodeBuffer, len); [all …]
|
/base/security/appverify/interfaces/innerkits/appverify/test/unittest/src/ |
D | hap_cert_verify_openssl_utils_test.cpp | 36 std::unique_ptr<char[]> decodeBuffer = std::make_unique<char[]>(base64String.size()); in Base64StringDecode() local 37 if (decodeBuffer == nullptr) { in Base64StringDecode() 42 …int len = EVP_DecodeBlock(reinterpret_cast<unsigned char*>(decodeBuffer.get()), input, base64Strin… in Base64StringDecode() 48 output.PutData(0, decodeBuffer.get(), len); in Base64StringDecode() 49 decodeBuffer.reset(nullptr); in Base64StringDecode()
|
/base/security/appverify/interfaces/innerkits/appverify/src/util/ |
D | hap_cert_verify_openssl_utils.cpp | 62 …std::unique_ptr<unsigned char[]> decodeBuffer = std::make_unique<unsigned char[]>(base64String.siz… in GetX509CertFromBase64String() local 65 int len = EVP_DecodeBlock(decodeBuffer.get(), input, base64String.size()); in GetX509CertFromBase64String() 72 const unsigned char* derBits = decodeBuffer.get(); in GetX509CertFromBase64String()
|