Don't call memcpy() with 0-length arguments

The standard prohibits calling memcpy() with NULL pointer
arguments, even if the size argument is 0.

The TLS-1.2 PRF generator setup function previously called
memcpy() with the label and salt as the source, even if
they were of length 0, as exercised by the derive_key_policy
test case in the PSA crypto test suite.

This commit adds guards around the memcpy() calls so that they
are only executed of salt or label have positive length, respectively.
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 5ee43e4..f0de861 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -3708,9 +3708,17 @@
 
     /* Write `label + seed' at the end of the `A(i) + seed` buffer,
      * leaving the initial `hash_length` bytes unspecified for now. */
-    memcpy( tls12_prf->Ai_with_seed + hash_length, label, label_length );
-    memcpy( tls12_prf->Ai_with_seed + hash_length + label_length,
-            salt, salt_length );
+    if( label_length != 0 )
+    {
+        memcpy( tls12_prf->Ai_with_seed + hash_length,
+                label, label_length );
+    }
+
+    if( salt_length != 0 )
+    {
+        memcpy( tls12_prf->Ai_with_seed + hash_length + label_length,
+                salt, salt_length );
+    }
 
     /* The first block gets generated when
      * psa_generator_read() is called. */