mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00: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);
|
pid = atoi(s);
|
||||||
if (pid) {
|
if (pid) {
|
||||||
char out[1024];
|
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 (readlink(buf, out, sizeof(out) - 1) > 0) {
|
||||||
if (strstr(out, "gdb")) {
|
if (strstr(out, "gdb")) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user