From 3b3279b36884acfd3ef757e7fea4f89382f23355 Mon Sep 17 00:00:00 2001 From: Frank Elias Date: Fri, 16 Apr 2021 08:47:03 -0400 Subject: Empty Data error handling --- SmartDeviceLink/private/SDLProtocol.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SmartDeviceLink/private/SDLProtocol.m b/SmartDeviceLink/private/SDLProtocol.m index 348543801..46ec8f865 100644 --- a/SmartDeviceLink/private/SDLProtocol.m +++ b/SmartDeviceLink/private/SDLProtocol.m @@ -416,7 +416,7 @@ NS_ASSUME_NONNULL_BEGIN header.sessionID = [self sdl_retrieveSessionIDforServiceType:service]; header.messageID = ++_messageID; - if (encryption && data.length) { + if (encryption && data.length && data.length > 0) { NSError *encryptError = nil; data = [self.securityManager encryptData:data withError:&encryptError]; -- cgit v1.2.1