summarylogtreecommitdiffstats
path: root/0001-gcc9-strncpy.patch
diff options
context:
space:
mode:
authorChris Severance2019-08-09 20:57:52 -0400
committerChris Severance2019-08-09 20:57:52 -0400
commit2242be4f5788fc618cf89df4820f813e9a4d347e (patch)
tree7bb06b6a7608ba1f217cdf2bc0fedea20fcf1de0 /0001-gcc9-strncpy.patch
parentcb43d9c6ac195e0069216a0231d1f6423129d1c8 (diff)
downloadaur-2242be4f5788fc618cf89df4820f813e9a4d347e.tar.gz
autu: Update to 2.6.51.5-1
Diffstat (limited to '0001-gcc9-strncpy.patch')
-rw-r--r--0001-gcc9-strncpy.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/0001-gcc9-strncpy.patch b/0001-gcc9-strncpy.patch
new file mode 100644
index 000000000000..bbce9239cac7
--- /dev/null
+++ b/0001-gcc9-strncpy.patch
@@ -0,0 +1,21 @@
+--- programs/tncfg/tncfg.c.orig 2019-06-14 15:35:45.000000000 -0400
++++ programs/tncfg/tncfg.c 2019-08-09 20:50:45.519711644 -0400
+@@ -228,14 +228,16 @@ main(int argc, char *argv[])
+ createdelete = SADB_X_UNPLUMBIF;
+ strncat(virtname, optarg, sizeof(virtname)-1);
+ break;
+
+ case 'V':
+- strncpy(ifr.ifr_name, optarg, sizeof(ifr.ifr_name));
++ memset(ifr.ifr_name,0,sizeof(ifr.ifr_name));
++ strncpy(ifr.ifr_name, optarg, sizeof(ifr.ifr_name)-1);
+ break;
+ case 'P':
+- strncpy(shc.cf_name, optarg, sizeof(shc.cf_name));
++ memset(shc.cf_name,0,sizeof(shc.cf_name));
++ strncpy(shc.cf_name, optarg, sizeof(shc.cf_name)-1);
+ break;
+ case 'l':
+ {
+ char *toolname= malloc(strlen(argv[0])
+ + 10 /* update this when changing the sprintf() */