Re: cvs: non-pecl /simple_cvs simple_cvs.c simple_cvs_defs.h simple_cvs_utils.c
| From: | Marcus Boerger | Date: | Tue, 20 Apr 2004 07:52:42 +0000 |
| Subject: | Re: cvs: non-pecl /simple_cvs simple_cvs.c simple_cvs_defs.h simple_cvs_utils.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-27120@lists.php.net to get a copy of this message | ||
Hello Shie,
Tuesday, April 20, 2004, 9:30:41 AM, you wrote:
> shie Tue Apr 20 03:30:41 2004 EDT
> Modified files:
> /non-pecl/simple_cvs simple_cvs.c simple_cvs_defs.h
> simple_cvs_utils.c
> Log:
> fixed: sprintf==>snprintf (thanks to derick)
@@ -417,7 +416,7 @@
Please use the SCVS_STAT_* constants to check for statuses */
PHP_FUNCTION(scvs_status)
{
- char *un, buf[1024];
+ char *un, buf[BUFSIZE];
int un_len;
if (ZEND_NUM_ARGS() != 1 ||
@@ -435,7 +434,7 @@
if(array_init(return_value) != SUCCESS) zend_error(E_ERROR, "unable to create
array");
/* chdir into the module dir - thereby performing the MINIMAL sanity check */
- sprintf(buf, "%s/%s", GGET(workingDir), GGET(moduleName));
+ snprintf(buf, BUFSIZE, "%s/%s", GGET(workingDir), GGET(moduleName));
if (chdir(buf) != 0) {
[...]
This pretty much looks like spprintf would be correct.
--
Best regards,
Marcus mailto:helly@php.net