diff options
author | Stanislav Malyshev <stas@php.net> | 2003-03-31 07:34:05 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2003-03-31 07:34:05 +0000 |
commit | 26c51b73f1b002d90e679a530b3f539986a9f2a8 (patch) | |
tree | b59f87ae01b9177f0ae4c5433a548a9137216ecc /Zend | |
parent | 0481896ff7217ceff642a922fe03c70550f8a39f (diff) | |
download | php-git-26c51b73f1b002d90e679a530b3f539986a9f2a8.tar.gz |
Use strncpy instead of sprintf
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 84d72cd8d4..c9f50227c1 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -992,7 +992,8 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co if (EG(exception)) { char ex_class_name[128]; if(Z_TYPE_P(EG(exception)) == IS_OBJECT) { - snprintf(ex_class_name, 127, "%s", Z_OBJ_CLASS_NAME_P(EG(exception))); + strncpy(ex_class_name, Z_OBJ_CLASS_NAME_P(EG(exception)), 127); + ex_class_name[127] = '\0'; } else { strcpy(ex_class_name, "Unknown Exception"); } |