cvs: php-src /main network.c /win32 select.c

From: Date: Tue, 12 Aug 2003 00:58:53 +0000
Subject: cvs: php-src /main network.c /win32 select.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-23114@lists.php.net to get a copy of this message
iliaa Mon Aug 11 20:58:53 2003 EDT Modified files: /php-src/main network.c /php-src/win32 select.c Log: emalloc -> safe_emalloc Index: php-src/main/network.c diff -u php-src/main/network.c:1.102 php-src/main/network.c:1.103 --- php-src/main/network.c:1.102 Sun Aug 10 17:30:36 2003 +++ php-src/main/network.c Mon Aug 11 20:58:52 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: network.c,v 1.102 2003/08/10 21:30:36 helly Exp $ */ +/* $Id: network.c,v 1.103 2003/08/12 00:58:52 iliaa Exp $ */ /*#define DEBUG_MAIN_NETWORK 1*/ @@ -240,7 +240,7 @@ in = *((struct in_addr *) host_info->h_addr); } - *sal = emalloc(2 * sizeof(*sal)); + *sal = safe_emalloc(2, sizeof(*sal), 0); sap = *sal; *sap = emalloc(sizeof(struct sockaddr_in)); (*sap)->sa_family = AF_INET; Index: php-src/win32/select.c diff -u php-src/win32/select.c:1.4 php-src/win32/select.c:1.5 --- php-src/win32/select.c:1.4 Tue Jun 10 16:03:46 2003 +++ php-src/win32/select.c Mon Aug 11 20:58:52 2003 @@ -19,7 +19,7 @@ #include "php.h" #include "php_network.h" -/* $Id: select.c,v 1.4 2003/06/10 20:03:46 imajes Exp $ */ +/* $Id: select.c,v 1.5 2003/08/12 00:58:52 iliaa Exp $ */ /* Win32 select() will only work with sockets, so we roll our own implementation that will * get the OS file handle from regular fd's and sockets and then use WaitForMultipleObjects(). @@ -50,7 +50,7 @@ return 0; } - handles = (HANDLE*)emalloc((fd_count + sock_count) * sizeof(HANDLE)); + handles = (HANDLE*)safe_emalloc((fd_count + sock_count), sizeof(HANDLE), 0); /* populate the events and handles arrays */ f = 0;

« previous php.cvs (#23114) next »