bcrypt (1.1-6) 10_amd_memory

Summary

 wrapbf.c |    3 +++
 1 file changed, 3 insertions(+)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 10_amd_memory.dpatch by Kevin Coyner <kcoyner@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad bcrypt-1.1~/wrapbf.c bcrypt-1.1/wrapbf.c
--- bcrypt-1.1~/wrapbf.c	2009-10-08 23:02:14.000000000 -0400
+++ bcrypt-1.1/wrapbf.c	2009-10-18 20:43:14.000000000 -0400
@@ -21,6 +21,9 @@
 
   getEndian(&myEndian);
 
+  if ((*input = realloc(*input, sz + 2)) == NULL)
+    memerror();
+
   memmove(*input+2, *input, sz);
 
   memcpy(*input, myEndian, 1);