Skip to content

Commit 3b83d7e

Browse files
committed
Zend: change uses of sprintf into snprintf
1 parent 3b951e7 commit 3b83d7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_gdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ZEND_API bool zend_gdb_present(void)
130130
pid = atoi(s);
131131
if (pid) {
132132
char out[1024];
133-
sprintf(buf, "/proc/%d/exe", (int)pid);
133+
snprintf(buf, sizeof(buf), "/proc/%d/exe", (int)pid);
134134
if (readlink(buf, out, sizeof(out) - 1) > 0) {
135135
if (strstr(out, "gdb")) {
136136
ret = 1;

0 commit comments

Comments
 (0)