#20768 [WFx->]: MySql temp file error
| From: | derick@php.net | Date: | Mon, 02 Dec 2002 19:26:56 +0000 |
| Subject: | #20768 [WFx->]: MySql temp file error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-26415@lists.php.net to get a copy of this message | ||
ID: 20768
Updated by: derick@php.net
Reported By: jphp@netjunky.com
Status: Won\'t fix
Bug Type: Compile Failure
Operating System: Debian 3.0 Stable / Sparc
PHP Version: 4.3.0RC2
New Comment:
It's a warning, not an error.
Previous Comments:
------------------------------------------------------------------------
[2002-12-02 13:25:30] jphp@netjunky.com
It may be safe, but it stops the compile. I can't build with the code
as is.
------------------------------------------------------------------------
[2002-12-02 13:23:31] derick@php.net
It's harmless; just ignore it. The MySQL library uses it in a safe way
anyway.
Derick
------------------------------------------------------------------------
[2002-12-02 13:19:49] jphp@netjunky.com
When building 4.3.0RC2 against apache 1.3.26 DSO I get an error
stating that usage of tempnam() is insecure - line 103 of
ext/mysql/libmysql/my_tempnam.c
I replaced line 103 with the following code, which builds and should
function identically.
/* filespec will be dir + '/' + pfx + 'XXXXXX' + null */
res = malloc(strlen(dir) + strlen(pfx) + 8);
res[0] = '\0';
strcat(res, dir);
strcat(res, "/");
strcat(res, pfx);
strcat(res, "XXXXXX");
mkstemp(res);
/* res=tempnam((char *)dir, (my_string) pfx); */
Someone who knows the mysql code should check this if it's not a local
build problem on my end.
Other details:
Linux Kernel 2.4.18 / sparc64
libc6 2.2.5-11.2
gcc 2.95.4 20011002 (Debian prerelease)
./configure --with-mysql --with-apxs --prefix=/usr --sysconfdir=/etc
--localstatedir=/var/php --with-zlib --with-dom --with-gd --with-mysql
--enable-sockets --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
--with-xpm-dir=/usr/X11R6/lib --with-freetype-dir=/usr/lib
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20768&edit=1