diff options
Diffstat (limited to 'meta/recipes-devtools/file/files')
3 files changed, 126 insertions, 27 deletions
diff --git a/meta/recipes-devtools/file/files/0001-PR-579-net147-Fix-stack-overrun.patch b/meta/recipes-devtools/file/files/0001-PR-579-net147-Fix-stack-overrun.patch new file mode 100644 index 0000000000..57725b1c5f --- /dev/null +++ b/meta/recipes-devtools/file/files/0001-PR-579-net147-Fix-stack-overrun.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From fc6b51aa67a11806c95363e1bec925d15b3a98a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christos Zoulas <christos@zoulas.com> | ||
3 | Date: Thu, 5 Dec 2024 18:35:40 +0000 | ||
4 | Subject: [PATCH] PR/579: net147: Fix stack overrun. | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/file/file/commit/b3384a1fbfa1fee99986e5750ab8e700de4f24ad] | ||
7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
8 | --- | ||
9 | src/readelf.c | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/src/readelf.c b/src/readelf.c | ||
13 | index fe4cf541..d209d86d 100644 | ||
14 | --- a/src/readelf.c | ||
15 | +++ b/src/readelf.c | ||
16 | @@ -27,7 +27,7 @@ | ||
17 | #include "file.h" | ||
18 | |||
19 | #ifndef lint | ||
20 | -FILE_RCSID("@(#)$File: readelf.c,v 1.196 2024/11/11 15:49:11 christos Exp $") | ||
21 | +FILE_RCSID("@(#)$File: readelf.c,v 1.197 2024/12/05 18:35:40 christos Exp $") | ||
22 | #endif | ||
23 | |||
24 | #ifdef BUILTIN_ELF | ||
25 | @@ -1726,7 +1726,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, | ||
26 | Elf64_Phdr ph64; | ||
27 | const char *linking_style; | ||
28 | unsigned char nbuf[NBUFSIZE]; | ||
29 | - char interp[128]; | ||
30 | + char interp[NBUFSIZE]; | ||
31 | ssize_t bufsize; | ||
32 | size_t offset, align, need = 0; | ||
33 | int pie = 0, dynamic = 0; | ||
diff --git a/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch b/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch new file mode 100644 index 0000000000..7601e6dead --- /dev/null +++ b/meta/recipes-devtools/file/files/0001-Use-4-in-default-reset-previous-negative-offset-in-m.patch | |||
@@ -0,0 +1,93 @@ | |||
1 | From b310a0c2d3e4a1c12d579ad5c0266f1092a91340 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christos Zoulas <christos@zoulas.com> | ||
3 | Date: Wed, 27 Nov 2024 15:37:46 +0000 | ||
4 | Subject: [PATCH] Use +4 in default reset previous negative offset in magic in | ||
5 | zip entry | ||
6 | |||
7 | Upstream-Status: Backport [https://github.com/file/file/commit/b310a0c2d3e4a1c12d579ad5c0266f1092a91340] | ||
8 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
9 | --- | ||
10 | magic/Magdir/archive | 50 +++++++++++++++++++++++--------------------- | ||
11 | 1 file changed, 26 insertions(+), 24 deletions(-) | ||
12 | |||
13 | diff --git a/magic/Magdir/archive b/magic/Magdir/archive | ||
14 | index c8f440dc..b920f993 100644 | ||
15 | --- a/magic/Magdir/archive | ||
16 | +++ b/magic/Magdir/archive | ||
17 | @@ -1,5 +1,5 @@ | ||
18 | #------------------------------------------------------------------------------ | ||
19 | -# $File: archive,v 1.206 2024/11/26 19:39:14 christos Exp $ | ||
20 | +# $File: archive,v 1.207 2024/11/27 15:37:46 christos Exp $ | ||
21 | # archive: file(1) magic for archive formats (see also "msdos" for self- | ||
22 | # extracting compressed archives) | ||
23 | # | ||
24 | @@ -1875,15 +1875,6 @@ | ||
25 | >>>>>-22 string PK\005\006 | ||
26 | >>>>>>(-6.l-16) string APK\x20Sig\x20Block\x2042 \b, with APK Signing Block | ||
27 | |||
28 | -# Keyman Compiled Package File (keyman.com) | ||
29 | -# https://help.keyman.com/developer/current-version/reference/file-types/kmp | ||
30 | -# Find start of central directory | ||
31 | ->>>(-6.l) string PK\001\002 | ||
32 | -# Scan central directory for string 'kmp.json', will suffice for a | ||
33 | -# package containing about 150 files | ||
34 | ->>>>(-6.l) search/9000 kmp.json Keyman Compiled Package File | ||
35 | -!:mime application/vnd.keyman.kmp+zip | ||
36 | -!:ext kmp | ||
37 | |||
38 | # Specialised zip formats which start with a member named 'mimetype' | ||
39 | # (stored uncompressed, with no 'extra field') containing the file's MIME type. | ||
40 | @@ -2123,25 +2114,36 @@ | ||
41 | #>30 search/100/b application/epub+zip EPUB document | ||
42 | #!:mime application/epub+zip | ||
43 | |||
44 | -# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) | ||
45 | -# Next line excludes specialized formats: | ||
46 | +# APK Signing Block | ||
47 | >(26.s+30) leshort !0xcafe | ||
48 | >>30 search/100/b !application/epub+zip | ||
49 | ->>>26 string !\x8\0\0\0mimetype Zip archive data | ||
50 | -!:mime application/zip | ||
51 | ->>>>4 beshort x \b, at least | ||
52 | ->>>>4 use zipversion | ||
53 | ->>>>4 beshort x to extract | ||
54 | ->>>>8 beshort x \b, compression method= | ||
55 | ->>>>8 use zipcompression | ||
56 | ->>>>0x161 string WINZIP \b, WinZIP self-extracting | ||
57 | -# APK Signing Block | ||
58 | ->0 default x | ||
59 | ->>-22 string PK\005\006 | ||
60 | ->>>(-6.l-16) string APK\x20Sig\x20Block\x2042 Android package (APK), with APK Signing Block | ||
61 | +>>>26 string !\x8\0\0\0mimetype | ||
62 | +>>>>-22 string PK\005\006 | ||
63 | +>>>>>(-6.l-16) string APK\x20Sig\x20Block\x2042 Android package (APK), with APK Signing Block | ||
64 | !:mime application/vnd.android.package-archive | ||
65 | !:ext apk | ||
66 | |||
67 | +# Keyman Compiled Package File (keyman.com) | ||
68 | +# https://help.keyman.com/developer/current-version/reference/file-types/kmp | ||
69 | +# Find start of central directory | ||
70 | +>>>>>(-6.l) string PK\001\002 | ||
71 | +# Scan central directory for string 'kmp.json', will suffice for a | ||
72 | +# package containing about 150 files | ||
73 | +>>>>>>(-6.l) search/9000 kmp.json Keyman Compiled Package File | ||
74 | +!:mime application/vnd.keyman.kmp+zip | ||
75 | +!:ext kmp | ||
76 | + | ||
77 | +# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) | ||
78 | +# Next line excludes specialized formats: | ||
79 | +>>>>+4 default x | ||
80 | +>>>>>4 beshort x Zip archive data, at least | ||
81 | +!:mime application/zip | ||
82 | +>>>>>4 use zipversion | ||
83 | +>>>>>4 beshort x to extract | ||
84 | +>>>>>8 beshort x \b, compression method= | ||
85 | +>>>>>8 use zipcompression | ||
86 | +>>>>>0x161 string WINZIP \b, WinZIP self-extracting | ||
87 | + | ||
88 | # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) | ||
89 | 0 string PK\005\006 Zip archive data (empty) | ||
90 | !:mime application/zip | ||
91 | -- | ||
92 | 2.39.5 | ||
93 | |||
diff --git a/meta/recipes-devtools/file/files/print_c.patch b/meta/recipes-devtools/file/files/print_c.patch deleted file mode 100644 index 760813f9c2..0000000000 --- a/meta/recipes-devtools/file/files/print_c.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From e329257b8e22362b62e6c930447ef6feadd63f32 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe Slater <joe.slater@windriver.com> | ||
3 | Date: Mon, 7 Aug 2023 22:37:19 +0000 | ||
4 | Subject: [PATCH] print.c: initialize timezone data for localtime_r() | ||
5 | |||
6 | The man page for localtime() points out that while it acts | ||
7 | like tzset() has been called, localtime_r() might not. We | ||
8 | have a local version of localtime_r() that avoids this, but | ||
9 | we do not compile it. | ||
10 | |||
11 | Upstream-Status: Submitted [file@astron.com] | ||
12 | |||
13 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
14 | --- | ||
15 | src/print.c | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | --- git.orig/src/print.c | ||
19 | +++ git/src/print.c | ||
20 | @@ -289,6 +289,7 @@ file_fmtdatetime(char *buf, size_t bsize | ||
21 | goto out; | ||
22 | |||
23 | if (flags & FILE_T_LOCAL) { | ||
24 | + tzset(); | ||
25 | tm = localtime_r(&t, &tmz); | ||
26 | } else { | ||
27 | tm = gmtime_r(&t, &tmz); | ||