return PSA_ERROR_BUFFER_TOO_SMALL intead of PSA_ERROR_INVALID_ARGUMENT
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 190abe1..d507a53 100755
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1523,7 +1523,7 @@
 
         //make sure we have place to hold the tag in the ciphertext buffer
         if( ciphertext_size < ( plaintext_length + tag_length ) )
-            return( PSA_ERROR_INVALID_ARGUMENT );
+            return( PSA_ERROR_BUFFER_TOO_SMALL );
 
         //update the tag pointer to point to the end of the ciphertext_length
         tag = ciphertext + plaintext_length;
@@ -1557,7 +1557,7 @@
 
         //make sure we have place to hold the tag in the ciphertext buffer
         if( ciphertext_size < ( plaintext_length + tag_length ) )
-            return( PSA_ERROR_INVALID_ARGUMENT );
+            return( PSA_ERROR_BUFFER_TOO_SMALL );
 
         //update the tag pointer to point to the end of the ciphertext_length
         tag = ciphertext + plaintext_length;