about summary refs log tree commit diff
path: root/qemu_mode/patches/make_strncpy_safe.diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-11-06 09:37:14 +0100
committerGitHub <noreply@github.com>2020-11-06 09:37:14 +0100
commit3b799c09cd68bb68b26784261f1fbaa3e737c747 (patch)
treee581c3689d5fe231678464bb6bd48cab75c7db41 /qemu_mode/patches/make_strncpy_safe.diff
parent5ee63a6e6267e448342ccb28cc8d3c0d34ffc1cd (diff)
parent50c98445fe74b92d2e6ab784def3e8b26a662b36 (diff)
downloadafl++-3b799c09cd68bb68b26784261f1fbaa3e737c747.tar.gz
Merge pull request #594 from AFLplusplus/dev
push to stable
Diffstat (limited to 'qemu_mode/patches/make_strncpy_safe.diff')
-rw-r--r--qemu_mode/patches/make_strncpy_safe.diff31
1 files changed, 0 insertions, 31 deletions
diff --git a/qemu_mode/patches/make_strncpy_safe.diff b/qemu_mode/patches/make_strncpy_safe.diff
deleted file mode 100644
index 38c7d248..00000000
--- a/qemu_mode/patches/make_strncpy_safe.diff
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/util/qemu-sockets.c	2020-03-28 13:55:09.511029429 +0100
-+++ b/util/qemu-sockets.c	2020-03-28 14:01:12.147693937 +0100
-@@ -877,7 +877,7 @@
- 
-     memset(&un, 0, sizeof(un));
-     un.sun_family = AF_UNIX;
--    strncpy(un.sun_path, path, sizeof(un.sun_path));
-+    strncpy(un.sun_path, path, sizeof(un.sun_path) - 1);
- 
-     if (bind(sock, (struct sockaddr*) &un, sizeof(un)) < 0) {
-         error_setg_errno(errp, errno, "Failed to bind socket to %s", path);
-@@ -922,7 +922,7 @@
- 
-     memset(&un, 0, sizeof(un));
-     un.sun_family = AF_UNIX;
--    strncpy(un.sun_path, saddr->path, sizeof(un.sun_path));
-+    strncpy(un.sun_path, saddr->path, sizeof(un.sun_path) - 1);
- 
-     /* connect to peer */
-     do {
---- a/block/sheepdog.c	2020-03-28 14:01:57.164360270 +0100
-+++ b/block/sheepdog.c	2020-03-28 14:02:52.781026597 +0100
-@@ -1236,7 +1236,7 @@
-      * don't want the send_req to read uninitialized data.
-      */
-     strncpy(buf, filename, SD_MAX_VDI_LEN);
--    strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN);
-+    strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN - 1);
- 
-     memset(&hdr, 0, sizeof(hdr));
-     if (lock) {