diff --git a/Zend/zend_gdb.c b/Zend/zend_gdb.c index 60a70b0a9ac..102b0b31819 100644 --- a/Zend/zend_gdb.c +++ b/Zend/zend_gdb.c @@ -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;