[packages/r8168] - update str(l|s)cpy udage

baggins baggins at pld-linux.org
Sun Mar 17 02:10:06 CET 2024


commit 164f22e4b5d46f7883592a9ac1b19bfb94e486fd
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Mar 17 00:13:34 2024 +0100

    - update str(l|s)cpy udage

 kernel-strcpy.patch | 12 ++++++++++++
 r8168.spec          |  2 ++
 2 files changed, 14 insertions(+)
---
diff --git a/r8168.spec b/r8168.spec
index 186f9df..a4d8042 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -19,6 +19,7 @@ URL:		http://www.realtek.com.tw/
 # unfortunately this download is not DF-friendly.
 Source0:	%{pname}-%{version}.tar.bz2
 # Source0-md5:	31d41df8c9234d187d42b881a087d7df
+Patch0:		kernel-strcpy.patch
 BuildRequires:	rpmbuild(macros) >= 1.701
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRoot:	%{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
@@ -70,6 +71,7 @@ Express Gigabit Ethernet.\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
 %{expand:%build_kernel_packages}
diff --git a/kernel-strcpy.patch b/kernel-strcpy.patch
new file mode 100644
index 0000000..53c86d3
--- /dev/null
+++ b/kernel-strcpy.patch
@@ -0,0 +1,12 @@
+diff -ru r8168-8.052.01/src/r8168_n.c r8168-8.052.01.strcpy/src/r8168_n.c
+--- r8168-8.052.01/src/r8168_n.c	2023-09-26 16:26:06.000000000 +0200
++++ r8168-8.052.01.strcpy/src/r8168_n.c	2024-03-17 00:11:58.529966908 +0100
+@@ -6293,7 +6293,7 @@
+         info->eedump_len = tp->eeprom_len;
+         BUILD_BUG_ON(sizeof(info->fw_version) < sizeof(rtl_fw->version));
+         if (rtl_fw)
+-                strlcpy(info->fw_version, rtl_fw->version,
++                strscpy(info->fw_version, rtl_fw->version,
+                         sizeof(info->fw_version));
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/164f22e4b5d46f7883592a9ac1b19bfb94e486fd



More information about the pld-cvs-commit mailing list