Browse Source

...but not when it's being used as a digest algorithm...

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
1fbd6f7d76
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/crypto/crypto_null.c

+ 4
- 2
src/crypto/crypto_null.c View File

37
 
37
 
38
 static void null_encode ( void *ctx __unused, const void *src,
38
 static void null_encode ( void *ctx __unused, const void *src,
39
 			  void *dst, size_t len ) {
39
 			  void *dst, size_t len ) {
40
-	memcpy ( dst, src, len );
40
+	if ( dst )
41
+		memcpy ( dst, src, len );
41
 }
42
 }
42
 
43
 
43
 static void null_decode ( void *ctx __unused, const void *src,
44
 static void null_decode ( void *ctx __unused, const void *src,
44
 			  void *dst, size_t len ) {
45
 			  void *dst, size_t len ) {
45
-	memcpy ( dst, src, len );
46
+	if ( dst )
47
+		memcpy ( dst, src, len );
46
 }
48
 }
47
 
49
 
48
 static void null_final ( void *ctx __unused, void *out __unused ) {
50
 static void null_final ( void *ctx __unused, void *out __unused ) {

Loading…
Cancel
Save