Set output length to safe value
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index c1c47d2..ba688bc 100755
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1422,6 +1422,7 @@
     key_slot_t *slot;
     (void) salt;
     (void) salt_length;
+    *output_length = 0;
 
     if( key == 0 || key > MBEDTLS_PSA_KEY_SLOT_COUNT )
         return( PSA_ERROR_INVALID_ARGUMENT );
@@ -1495,6 +1496,7 @@
     key_slot_t *slot;
     (void) salt;
     (void) salt_length;
+    *output_length = 0;
 
     if( key == 0 || key > MBEDTLS_PSA_KEY_SLOT_COUNT )
         return( PSA_ERROR_EMPTY_SLOT );