From 3b83d7e3b5deb373c9927f0fd2349e9c24a5063e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 9 Jun 2024 19:38:01 +0200 Subject: [PATCH] Zend: change uses of sprintf into snprintf --- Zend/zend_gdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;