wok-current view broadcom-wl64/stuff/014-linux414.patch @ rev 25687
Up expat CVE-2024-28757
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Mar 15 07:23:20 2024 +0000 (5 months ago) |
parents | |
children |
line source
1 From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar>
2 Date: Fri, 29 Dec 2017 23:44:24 -0400
3 Subject: linux414
4 Origin: https://bugs.debian.org/885885
6 linux 4.14 changed the kernel_read function prototype.
7 ---
8 src/shared/linux_osl.c | 12 +++++++++++-
9 1 files changed, 12 insertions(+), 1 deletion(-)
11 diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
12 index 9adc392..b24a973 100644
13 --- a/src/shared/linux_osl.c
14 +++ b/src/shared/linux_osl.c
15 @@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int len, void *image)
16 {
17 struct file *fp = (struct file *)image;
18 int rdlen;
19 + loff_t pos;
21 if (!image)
22 return 0;
24 - rdlen = kernel_read(fp, fp->f_pos, buf, len);
25 + pos = fp->f_pos;
26 + rdlen = kernel_read(fp,
27 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
28 + pos,
29 +#endif
30 + buf, len
31 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
32 + ,&pos
33 +#endif
34 + );
35 if (rdlen > 0)
36 fp->f_pos += rdlen;