94b15d0
--- bcrypt-ORIG/rwfile.c	2002-09-12 17:03:01.000000000 -0700
94b15d0
+++ bcrypt-ORIG/rwfile.c	2016-06-30 12:53:08.568733251 -0700
94b15d0
@@ -32,7 +32,7 @@ 
94b15d0
     r = j - sz;
94b15d0
 
94b15d0
   if ( r < j) {
94b15d0
-    if ((*input = realloc(*input, sz + r + 1)) == NULL)
94b15d0
+    if ((*input = realloc(*input, sz + r + 2)) == NULL)
94b15d0
       memerror();
94b15d0
 
94b15d0
     memset(*input+sz, 0, r + 1);