Bignum: remove unnecessary NULL pointer checks

A null pointer dereference, or null pointer plus small offset, is a
clean runtime error in most environments. So it's not particularly
useful to protect against this.

While at it make a null pointer check that is actually necessary more
robust.

Signed-off-by: Janos Follath <janos.follath@arm.com>
diff --git a/library/bignum_core.c b/library/bignum_core.c
index ab7d8e1..ee71e3f 100644
--- a/library/bignum_core.c
+++ b/library/bignum_core.c
@@ -227,7 +227,7 @@
 
     /* Avoid calling `memcpy` with NULL source or destination argument,
      * even if buflen is 0. */
-    if( buflen != 0 )
+    if( buf != NULL )
     {
         Xp = (unsigned char*) X;
         memcpy( Xp + overhead, buf, buflen );