projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix.
[gnulib.git]
/
lib
/
gc-libgcrypt.c
diff --git
a/lib/gc-libgcrypt.c
b/lib/gc-libgcrypt.c
index
bc0d12b
..
a9e6279
100644
(file)
--- a/
lib/gc-libgcrypt.c
+++ b/
lib/gc-libgcrypt.c
@@
-1,5
+1,5
@@
/* gc-libgcrypt.c --- Crypto wrappers around Libgcrypt for GC.
/* gc-libgcrypt.c --- Crypto wrappers around Libgcrypt for GC.
- * Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005
, 2006
Simon Josefsson
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
@@
-65,6
+65,8
@@
gc_done (void)
return;
}
return;
}
+#ifdef GC_USE_RANDOM
+
/* Randomness. */
Gc_rc
/* Randomness. */
Gc_rc
@@
-88,6
+90,8
@@
gc_random (char *data, size_t datalen)
return GC_OK;
}
return GC_OK;
}
+#endif
+
/* Memory allocation. */
void
/* Memory allocation. */
void
@@
-243,6
+247,8
@@
gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle)
Gc_rc rc = GC_OK;
ctx = calloc (sizeof (*ctx), 1);
Gc_rc rc = GC_OK;
ctx = calloc (sizeof (*ctx), 1);
+ if (!ctx)
+ return GC_MALLOC_ERROR;
ctx->alg = hash;
ctx->mode = mode;
ctx->alg = hash;
ctx->mode = mode;