diff options
author | Laurent Bercot <ska-adelie@skarnet.org> | 2019-03-07 00:23:26 +0000 |
---|---|---|
committer | Laurent Bercot <ska-adelie@skarnet.org> | 2019-03-07 00:23:26 +0000 |
commit | 5dba7907e14196aa368b0d84d3a2df7a0fd55123 (patch) | |
tree | 56fdada6ebda794f877de30628ac949a0f3a46f6 /system/libaio/improper-strncpy-usage.patch | |
parent | 506539dec83c52b7e24bbd3f98cb8bea68b2d886 (diff) | |
parent | 89573ea3c2e8ec27ad4433a00fa238f7be475c54 (diff) | |
download | packages-5dba7907e14196aa368b0d84d3a2df7a0fd55123.tar.gz packages-5dba7907e14196aa368b0d84d3a2df7a0fd55123.tar.bz2 packages-5dba7907e14196aa368b0d84d3a2df7a0fd55123.tar.xz packages-5dba7907e14196aa368b0d84d3a2df7a0fd55123.zip |
Merge branch 'master' of code.foxkit.us:adelie/packages
Diffstat (limited to 'system/libaio/improper-strncpy-usage.patch')
-rw-r--r-- | system/libaio/improper-strncpy-usage.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/system/libaio/improper-strncpy-usage.patch b/system/libaio/improper-strncpy-usage.patch new file mode 100644 index 000000000..b2f6b86a4 --- /dev/null +++ b/system/libaio/improper-strncpy-usage.patch @@ -0,0 +1,26 @@ +It is invalid to use the src size as the strncpy size parameter. + +Found by GCC 8.3, fixed by awilfox. + +--- libaio-0.3.111/harness/cases/19.t.old 2018-03-06 22:24:47.000000000 +0000 ++++ libaio-0.3.111/harness/cases/19.t 2019-02-28 22:20:03.170000000 +0000 +@@ -41,7 +41,7 @@ + int fd; + char template[sizeof(TEMPLATE)]; + +- strncpy(template, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(template, TEMPLATE, sizeof(template)); + fd = mkostemp(template, O_DIRECT); + if (fd < 0) { + perror("mkstemp"); +--- libaio-0.3.111/harness/cases/21.t.old 2018-03-06 22:24:47.000000000 +0000 ++++ libaio-0.3.111/harness/cases/21.t 2019-02-28 22:20:13.120000000 +0000 +@@ -43,7 +43,7 @@ + int fd; + char temp_file[sizeof(TEMPLATE)]; + +- strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(temp_file, TEMPLATE, sizeof(temp_file)); + fd = mkstemp(temp_file); + if (fd < 0) { + perror("mkstemp"); |