void-packages/srcpkgs/xsel/patches/strncpy.patch

14 lines
383 B
Diff
Raw Normal View History

2018-11-21 12:17:09 +01:00
diff --git xsel.c xsel.c
index 79cc68b..556585e 100644
--- xsel.c
+++ xsel.c
@@ -1983,7 +1983,7 @@ main(int argc, char *argv[])
dont_output = True;
} else if (OPT("--logfile") || OPT("-l")) {
i++; if (i >= argc) goto usage_err;
- strncpy (logfile, argv[i], MAXFNAME);
+ strncpy (logfile, argv[i], MAXFNAME-1);
} else {
goto usage_err;
}