diff --git a/src/platform/android/DnssdImpl.cpp b/src/platform/android/DnssdImpl.cpp index 52d20525e8ca04..fa5a9d30e589f2 100644 --- a/src/platform/android/DnssdImpl.cpp +++ b/src/platform/android/DnssdImpl.cpp @@ -44,7 +44,7 @@ jmethodID sPublishMethod = nullptr; jmethodID sRemoveServicesMethod = nullptr; } // namespace -// Implemention of functions declared in lib/dnssd/platform/Dnssd.h +// Implementation of functions declared in lib/dnssd/platform/Dnssd.h CHIP_ERROR ChipDnssdInit(DnssdAsyncReturnCallback initCallback, DnssdAsyncReturnCallback errorCallback, void * context) { diff --git a/src/platform/android/KeyValueStoreManagerImpl.cpp b/src/platform/android/KeyValueStoreManagerImpl.cpp index 46ba0354f915cb..3b15d888810e56 100644 --- a/src/platform/android/KeyValueStoreManagerImpl.cpp +++ b/src/platform/android/KeyValueStoreManagerImpl.cpp @@ -120,7 +120,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t ChipLogError(DeviceLayer, "KeyValueStoreManager base64 decoding failed"); return CHIP_ERROR_INTEGRITY_CHECK_FAILED; } - ReturnErrorCodeIf(offset_bytes >= decodedLength, CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorCodeIf(offset_bytes != 0 && offset_bytes >= decodedLength, CHIP_ERROR_INVALID_ARGUMENT); size_t read_size = std::min(value_size, decodedLength - offset_bytes); if (value_size + offset_bytes < decodedLength) {