gl-infra-builder-FUjr/patches-siflower-18.x/4009-fix-libubox-compile-error.patch
2022-11-14 17:10:34 +08:00

34 lines
1.3 KiB
Diff

From 97e7efd9c28a82eace4aa4004f5ef33e8918be57 Mon Sep 17 00:00:00 2001
From: gl-dengxinfa <xinfa.deng@gl-inet.com>
Date: Wed, 9 Nov 2022 10:21:42 +0800
Subject: [PATCH] fix: libubox compile error
---
.../libubox/patches/0001-fix-compile-error.patch | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 openwrt-18.06/package/libs/libubox/patches/0001-fix-compile-error.patch
diff --git a/openwrt-18.06/package/libs/libubox/patches/0001-fix-compile-error.patch b/openwrt-18.06/package/libs/libubox/patches/0001-fix-compile-error.patch
new file mode 100644
index 000000000..049619107
--- /dev/null
+++ b/openwrt-18.06/package/libs/libubox/patches/0001-fix-compile-error.patch
@@ -0,0 +1,14 @@
+Index: libubox-2018-07-25-c83a84af/blobmsg.c
+===================================================================
+--- libubox-2018-07-25-c83a84af.orig/blobmsg.c
++++ libubox-2018-07-25-c83a84af/blobmsg.c
+@@ -195,7 +195,8 @@ blobmsg_new(struct blob_buf *buf, int ty
+ attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED);
+ hdr = blob_data(attr);
+ hdr->namelen = cpu_to_be16(namelen);
+- strcpy((char *) hdr->name, (const char *)name);
++ //strcpy((char *) hdr->name, (const char *)name);
++ memcpy(hdr->name, name, namelen);
+ pad_end = *data = blobmsg_data(attr);
+ pad_start = (char *) &hdr->name[namelen];
+ if (pad_start < pad_end)
--
2.34.1