]> git.pld-linux.org Git - packages/r8168.git/commitdiff
- update str(l|s)cpy udage
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Mar 2024 23:13:34 +0000 (00:13 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Mar 2024 23:13:34 +0000 (00:13 +0100)
kernel-strcpy.patch [new file with mode: 0644]
r8168.spec

diff --git a/kernel-strcpy.patch b/kernel-strcpy.patch
new file mode 100644 (file)
index 0000000..53c86d3
--- /dev/null
@@ -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));
+ }
index 186f9dfbbbbd6ed9f09b7748537b2b584747730e..a4d8042004df7f9c714c2605a593b8e12b9c005c 100644 (file)
@@ -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}
This page took 0.103008 seconds and 4 git commands to generate.