Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/databases/db5/files/patch-lang_tcl_tcl__seq.c
16461 views
1
--- lang/tcl/tcl_seq.c.orig 2013-09-09 15:35:07 UTC
2
+++ lang/tcl/tcl_seq.c
3
@@ -555,9 +555,10 @@ tcl_SeqGetFlags(interp, objc, objv, seq)
4
for (i = 0; seq_flags[i].flag != 0; i++)
5
if (LF_ISSET(seq_flags[i].flag)) {
6
if (strlen(buf) > 0)
7
- (void)strncat(buf, " ", sizeof(buf));
8
- (void)strncat(
9
- buf, seq_flags[i].arg, sizeof(buf));
10
+ (void)strncat(buf, " ",
11
+ sizeof(buf) - (strlen(buf) + 1));
12
+ (void)strncat(buf, seq_flags[i].arg,
13
+ sizeof(buf) - (strlen(buf) + 1));
14
}
15
16
res = NewStringObj(buf, strlen(buf));
17
18