mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Zend: change uses of sprintf into snprintf
This commit is contained in:
parent
3b951e7b04
commit
3b83d7e3b5
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue