summaryrefslogtreecommitdiff
blob: e55cd00121baddd3995a1d3c6ac1f15c74a1eb5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/src/launcher.c
+++ b/src/launcher.c
@@ -366,7 +366,7 @@
                if(pos && (end = complete(&cache, tmpbuf)))
                {
                     strncpy(buf, tmpbuf, sizeof(buf));
-                    strncat(buf, end, sizeof(buf));
+                    strncat(buf, end, sizeof(buf) - 1);
                     found = true;
                }
 
@@ -387,7 +387,7 @@
 
           default:
                lastwastab = false;
-               strncat(buf, tmp, sizeof(tmp));
+               strncat(buf, tmp, sizeof(buf) - 1);
                ++pos;
                break;
           }