Fix crash under Windows MSVC 2008 does not allow operator[] on an empty std::vector
diff --git a/main/svl/source/passwordcontainer/passwordcontainer.cxx b/main/svl/source/passwordcontainer/passwordcontainer.cxx index 5c581d4..ff7f3da 100644 --- a/main/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/main/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -542,7 +542,8 @@ rtlCipherError result = rtl_cipher_init ( aDecoder, rtl_Cipher_DirectionDecode, - code, RTL_DIGEST_LENGTH_MD5, &iv[0], iv.size() ); + code, RTL_DIGEST_LENGTH_MD5, (iv.size()? &iv[0] : NULL), + iv.size() ); if( result == rtl_Cipher_E_None ) { ::rtl::ByteSequence aSeq = getBufFromAsciiLine( aLine ); @@ -596,7 +597,8 @@ rtlCipherError result = rtl_cipher_init ( aEncoder, rtl_Cipher_DirectionEncode, - code, RTL_DIGEST_LENGTH_MD5, &iv[0], iv.size() ); + code, RTL_DIGEST_LENGTH_MD5, (iv.size()? &iv[0] : NULL), + iv.size() ); if( result == rtl_Cipher_E_None ) {