File: 0017-snprintf-instead-of-sprintf-Closes-992407.patch

package info (click to toggle)
elvis-tiny 1.4-25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,104 kB
  • sloc: ansic: 13,810; sh: 25; makefile: 13
file content (22 lines) | stat: -rw-r--r-- 579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Mon, 30 Jun 2025 21:53:38 +0200
Subject: snprintf() instead of sprintf() (Closes: #992407)
Forwarded: No since upstream is inactive

---
 main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 5b60d09..46ac3df 100644
--- a/main.c
+++ b/main.c
@@ -263,7 +263,7 @@ int main(
 	str = getenv("HOME");
 	if (str)
 	{
-		sprintf(tmpblk.c, "%s%c%s", str, SLASH, HMEXRC);
+		snprintf(tmpblk.c, sizeof(tmpblk.c), "%s%c%s", str, SLASH, HMEXRC);
 		doexrc(tmpblk.c);
 	}
 #endif