Zend: change uses of sprintf into snprintf

This commit is contained in:
Niels Dossche 2024-06-09 19:38:01 +02:00
parent 3b951e7b04
commit 3b83d7e3b5

View File

@ -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;