diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m index 1bbdaa4d9..454f87cbb 100644 --- a/ActiveSync/SOGoActiveSyncDispatcher.m +++ b/ActiveSync/SOGoActiveSyncDispatcher.m @@ -4018,14 +4018,15 @@ void handle_eas_terminate(int signum) } xml = [NSString stringWithFormat: @"<%@ xmlns=\"ComposeMail:\">%@", cmdName, [s stringByEncodingBase64], cmdName]; - - - d = [xml dataUsingEncoding: NSASCIIStringEncoding]; } else { - d = [[theRequest content] wbxml2xml]; + // Handle empty Ping request, no need to try decoding the WBXML blob here + if ([[theRequest content] length]) + d = [[theRequest content] wbxml2xml]; + else + d = nil; } documentElement = nil;