diff --git a/SoObjects/SOGo/NSData+Crypto.m b/SoObjects/SOGo/NSData+Crypto.m
index 6a2f241d1..9d3f0e08d 100644
--- a/SoObjects/SOGo/NSData+Crypto.m
+++ b/SoObjects/SOGo/NSData+Crypto.m
@@ -119,7 +119,7 @@ static const char salt_chars[] =
   unsigned int stringLength = [theString length];
   unsigned int byteLength = stringLength/2;
   unsigned int byteCounter = 0;
-  unsigned char srcBuffer[stringLength];
+  unsigned char srcBuffer[stringLength+1];
   [theString getCString:(char *)srcBuffer];
   unsigned char *srcPtr = srcBuffer;
   unsigned char dstBuffer[byteLength];
