cvs: php-src(PHP_4_3) /ext/standard mail.c

From: Date: Thu, 11 Sep 2003 04:46:32 +0000
Subject: cvs: php-src(PHP_4_3) /ext/standard mail.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-23738@lists.php.net to get a copy of this message
iliaa Thu Sep 11 00:46:32 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/standard mail.c Log: MFH: Cleanup r1.76 patch Index: php-src/ext/standard/mail.c diff -u php-src/ext/standard/mail.c:1.66.2.8 php-src/ext/standard/mail.c:1.66.2.9 --- php-src/ext/standard/mail.c:1.66.2.8 Mon Sep 8 16:15:43 2003 +++ php-src/ext/standard/mail.c Thu Sep 11 00:46:31 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c,v 1.66.2.8 2003/09/08 20:15:43 iliaa Exp $ */ +/* $Id: mail.c,v 1.66.2.9 2003/09/11 04:46:31 iliaa Exp $ */ #include <stdlib.h> #include <ctype.h> @@ -198,21 +198,25 @@ /* make sure that sendmail_path contains a valid executable, failure to do * would make PHP abruptly exit without a useful error message. */ { - char *s=NULL, p; + char *s=NULL, *p; if ((s = strchr(sendmail_path, ' '))) { - p = *s; - *s = '\0'; + p = estrndup(sendmail_path, s - sendmail_path); + } else { + p = sendmail_path; } - if (access(sendmail_path, X_OK)) { + if (access(p, X_OK)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Permission denied: unable to execute shell to run mail delivery binary '%s'", sendmail_path); + if (extra_cmd != NULL) { + efree(sendmail_cmd); + } if (s) { - *s = p; + efree(p); } return 0; } if (s) { - *s = p; + efree(p); } }

« previous php.cvs (#23738) next »