mirror of
https://github.com/php/php-src.git
synced 2024-11-23 01:44:06 +08:00
Zend: change uses of sprintf into snprintf
This commit is contained in:
parent
3b951e7b04
commit
3b83d7e3b5
@ -130,7 +130,7 @@ ZEND_API bool zend_gdb_present(void)
|
||||
pid = atoi(s);
|
||||
if (pid) {
|
||||
char out[1024];
|
||||
sprintf(buf, "/proc/%d/exe", (int)pid);
|
||||
snprintf(buf, sizeof(buf), "/proc/%d/exe", (int)pid);
|
||||
if (readlink(buf, out, sizeof(out) - 1) > 0) {
|
||||
if (strstr(out, "gdb")) {
|
||||
ret = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user