diff --git a/services/distributeddataservice/libs/distributeddb/communicator/src/protocol_proto.cpp b/services/distributeddataservice/libs/distributeddb/communicator/src/protocol_proto.cpp index 73c99c0c1feb88a892fbdf6c1175ebb99e4f4842..11cacf276faf79bf85e7f286c2df6e5cccfd9ae5 100755 --- a/services/distributeddataservice/libs/distributeddb/communicator/src/protocol_proto.cpp +++ b/services/distributeddataservice/libs/distributeddb/communicator/src/protocol_proto.cpp @@ -292,7 +292,7 @@ int ProtocolProto::AnalyzeSplitStructure(const ParseResult &inResult, uint32_t & // Secondly: Check fragCount and fragNo uint32_t lengthBeSplit = frameLen - sizeof(CommPhyHeader); - if (fragCount < MIN_FRAGMENT_COUNT || fragCount > lengthBeSplit || fragNo >= fragCount) { + if (fragCount == 0 || fragCount < MIN_FRAGMENT_COUNT || fragCount > lengthBeSplit || fragNo >= fragCount) { LOGE("[Proto][ParsePhyOpt] FragCount=%u or fragNo=%u illegal.", fragCount, fragNo); return -E_PARSE_FAIL; }