cvs: php-src /ext/mhash mhash.c
| From: | Antony Dovgal | Date: | Mon, 25 Dec 2006 21:07:32 +0000 |
| Subject: | cvs: php-src /ext/mhash mhash.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-42383@lists.php.net to get a copy of this message | ||
tony2001 Mon Dec 25 21:07:32 2006 UTC
Modified files:
/php-src/ext/mhash mhash.c
Log:
use safe_emalloc()
http://cvs.php.net/viewvc.cgi/php-src/ext/mhash/mhash.c?r1=1.55&r2=1.56&diff_format=u
Index: php-src/ext/mhash/mhash.c
diff -u php-src/ext/mhash/mhash.c:1.55 php-src/ext/mhash/mhash.c:1.56
--- php-src/ext/mhash/mhash.c:1.55 Mon Dec 25 19:08:33 2006
+++ php-src/ext/mhash/mhash.c Mon Dec 25 21:07:32 2006
@@ -16,7 +16,7 @@
| Nikos Mavroyanopoulos <nmav@hellug.gr> (HMAC, KEYGEN) |
+----------------------------------------------------------------------+
*/
-/* $Id: mhash.c,v 1.55 2006/12/25 19:08:33 tony2001 Exp $ */
+/* $Id: mhash.c,v 1.56 2006/12/25 21:07:32 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -151,7 +151,7 @@
*len = 128;
}
- *key = emalloc(*len + 1);
+ *key = safe_emalloc(1, *len, 1);
if (mhash_keygen_ext(type, keygen, *key, *len, (void *) pass_str, pass_len) < 0) {
efree(*key);