aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/crypto_null.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-01-31 03:42:47 +0000
committerMichael Brown <mcb30@etherboot.org>2007-01-31 03:42:47 +0000
commit1fbd6f7d76446bd5ebb36943fc7b7f76d2c20a14 (patch)
tree83c9cd6ba1c821c688fb57a9a82ba33097f65b87 /src/crypto/crypto_null.c
parenta502fcda45ef5512f19621a1b4e8a46f1371907b (diff)
downloadipxe-1fbd6f7d76446bd5ebb36943fc7b7f76d2c20a14.zip
ipxe-1fbd6f7d76446bd5ebb36943fc7b7f76d2c20a14.tar.gz
ipxe-1fbd6f7d76446bd5ebb36943fc7b7f76d2c20a14.tar.bz2
...but not when it's being used as a digest algorithm...
Diffstat (limited to 'src/crypto/crypto_null.c')
-rw-r--r--src/crypto/crypto_null.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/crypto/crypto_null.c b/src/crypto/crypto_null.c
index dda59ea..9a2ea99 100644
--- a/src/crypto/crypto_null.c
+++ b/src/crypto/crypto_null.c
@@ -37,12 +37,14 @@ static int null_setkey ( void *ctx __unused, void *key __unused,
static void null_encode ( void *ctx __unused, const void *src,
void *dst, size_t len ) {
- memcpy ( dst, src, len );
+ if ( dst )
+ memcpy ( dst, src, len );
}
static void null_decode ( void *ctx __unused, const void *src,
void *dst, size_t len ) {
- memcpy ( dst, src, len );
+ if ( dst )
+ memcpy ( dst, src, len );
}
static void null_final ( void *ctx __unused, void *out __unused ) {