Skip to content

Commit f1e985d

Browse files
committed
suite: update stale c patches
1 parent 1ed99e5 commit f1e985d

58 files changed

Lines changed: 283 additions & 814 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
set -e
2-
git clone-rev.sh https://github.com/google/brotli.git "$PROJECT/repo" db4dfda9e1d417dabe3abf1bdedf3d9a9cc3b1ef
2+
git clone-rev.sh https://github.com/google/brotli.git "$PROJECT/repo" af041f55e7bfa3e1bc502f234538e1d6dd6282bd

harness-suite/projects-clike/freetype2/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source set-buildflags.sh
44

55
cd "$PROJECT/zlib"
66
./configure $CONFIGUREFLAGS
7-
make -j7 install prefix=/wasi-sdk/share/wasi-sysroot/ libdir=/wasi-sdk/share/wasi-sysroot/lib/wasm32-wasi/
7+
make -j7 install prefix=/wasi-sdk/share/wasi-sysroot/ libdir=/wasi-sdk/share/wasi-sysroot/lib/wasm32-wasip1/
88
echo "int main(void){return 0;}" > empty.c
99
$CC -lz empty.c
1010

harness-suite/projects-clike/freetype2/libarchive-stubs.patch

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ index 0482c57c..5efd17d2 100644
8686
static const size_t out_buf_len = 65536;
8787
char *out_buf;
8888
diff --git a/libarchive/archive_write_add_filter_program.c b/libarchive/archive_write_add_filter_program.c
89-
index c661cc7f..bca03921 100644
89+
index c661cc7f..0f996f0e 100644
9090
--- a/libarchive/archive_write_add_filter_program.c
9191
+++ b/libarchive/archive_write_add_filter_program.c
9292
@@ -329,6 +329,7 @@ int
@@ -95,10 +95,9 @@ index c661cc7f..bca03921 100644
9595
{
9696
+#if !defined(__wasi__)
9797
int ret, status;
98+
pid_t pid;
9899
ssize_t bytes_read;
99-
100-
@@ -386,5 +387,7 @@ cleanup:
101-
ret = ARCHIVE_FATAL;
100+
@@ -387,3 +388,5 @@ __archive_write_program_close(struct archive_write_filter *f,
102101
}
103102
return ret;
104103
+#endif

harness-suite/projects-clike/freetype2/prepare.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
set -e
2-
git clone-rev.sh https://gitlab.freedesktop.org/freetype/freetype.git "$PROJECT/freetype" ccabe7ac02c688d26d1753bafe80f5a2b00c479a
3-
git clone-rev.sh https://github.com/freetype/freetype2-testing.git "$PROJECT/freetype2-testing" 04fa94191645af39750f5eff0a66c49c5cb2c2cc
4-
git clone-rev.sh https://github.com/libarchive/libarchive.git "$PROJECT/libarchive" dcbf1e0ededa95849f098d154a25876ed5754bcf
5-
git clone-rev.sh https://github.com/madler/zlib.git "$PROJECT/zlib" 5a82f71ed1dfc0bec044d9702463dbdf84ea3b71
2+
git clone-rev.sh https://gitlab.freedesktop.org/freetype/freetype.git "$PROJECT/freetype" b6bcd2177f72bb4842c7701d7b7f633bb3fc951a
3+
git clone-rev.sh https://github.com/freetype/freetype2-testing.git "$PROJECT/freetype2-testing" db8ae87fead2ede5487e242dd9f5a129ca5e9fd2
4+
git clone-rev.sh https://github.com/libarchive/libarchive.git "$PROJECT/libarchive" 4b65c3866bc97c72897f00c7b7bb5c993a6de5a4
5+
git clone-rev.sh https://github.com/madler/zlib.git "$PROJECT/zlib" f9dd6009be3ed32415edf1e89d1bc38380ecb95d
66

77
git -C freetype apply ../freetype2-testing/fuzzing/settings/freetype2/ftoption.patch
88
git -C freetype apply ../freetype-stub-sjlj.patch
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/hunspell/hunzip.hxx b/src/hunspell/hunzip.hxx
2-
index 87bd880..1c508ed 100644
2+
index 319b4f7..02f030b 100644
33
--- a/src/hunspell/hunzip.hxx
44
+++ b/src/hunspell/hunzip.hxx
55
@@ -47,7 +47,7 @@
@@ -11,16 +11,3 @@ index 87bd880..1c508ed 100644
1111
#define HZIP_EXTENSION ".hz"
1212

1313
#define MSG_OPEN "error: %s: cannot open\n"
14-
diff --git a/src/tools/affdicfuzzer.cxx b/src/tools/affdicfuzzer.cxx
15-
index 73e7d05..328de30 100644
16-
--- a/src/tools/affdicfuzzer.cxx
17-
+++ b/src/tools/affdicfuzzer.cxx
18-
@@ -38,7 +38,7 @@ extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size)
19-
int wordlen = data[0];
20-
++data;
21-
--size;
22-
- if (wordlen > size)
23-
+ if (wordlen < 0 || wordlen >= size)
24-
return 0;
25-
26-
std::ofstream wrd("/tmp/test.word", std::ios_base::out | std::ios_base::trunc | std::ios_base::binary);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set -e
2-
git clone-rev.sh https://github.com/hunspell/hunspell.git "$PROJECT/repo" 8fe07304cba052506915a405e915f6fc0c49aa94
2+
git clone-rev.sh https://github.com/hunspell/hunspell.git "$PROJECT/repo" 3522bd6eacf06df256bcc49c28c4511965cf204d
33
git -C "$PROJECT/repo" apply ../stub_clock.patch
44
git -C "$PROJECT/repo" apply ../fix_harness.patch

harness-suite/projects-clike/jsoncpp/patch_eh.patch

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp
2-
index aa2b744..c3620a5 100644
2+
index 168251e..0ce4ab7 100644
33
--- a/src/lib_json/json_value.cpp
44
+++ b/src/lib_json/json_value.cpp
5-
@@ -212,13 +212,17 @@ JSONCPP_NORETURN void throwLogicError(String const& msg) {
5+
@@ -214,13 +214,17 @@ JSONCPP_NORETURN void throwLogicError(String const& msg) {
66
throw LogicError(msg);
77
}
88
#else // !JSON_USE_EXCEPTION
@@ -23,28 +23,21 @@ index aa2b744..c3620a5 100644
2323
#endif
2424

2525
diff --git a/src/test_lib_json/fuzz.cpp b/src/test_lib_json/fuzz.cpp
26-
index 5b75c22..8367d3b 100644
26+
index 3679a95..8367d3b 100644
2727
--- a/src/test_lib_json/fuzz.cpp
2828
+++ b/src/test_lib_json/fuzz.cpp
29-
@@ -11,10 +11,6 @@
30-
#include <memory>
31-
#include <string>
32-
33-
-namespace Json {
34-
-class Exception;
35-
-}
36-
-
37-
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
38-
Json::CharReaderBuilder builder;
39-
40-
@@ -45,10 +41,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
29+
@@ -41,14 +41,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
4130

4231
Json::Value root;
4332
const auto data_str = reinterpret_cast<const char*>(data);
33+
-#if JSON_USE_EXCEPTION
4434
- try {
35+
-#endif // JSON_USE_EXCEPTION
4536
- reader->parse(data_str, data_str + size, &root, nullptr);
37+
-#if JSON_USE_EXCEPTION
4638
- } catch (Json::Exception const&) {
4739
- }
40+
-#endif // JSON_USE_EXCEPTION
4841
+ reader->parse(data_str, data_str + size, &root, nullptr);
4942
// Whether it succeeded or not doesn't matter.
5043
return 0;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set -e
2-
git clone-rev.sh https://github.com/open-source-parsers/jsoncpp.git "$PROJECT/repo" ca98c98457b1163cca1f7d8db62827c115fec6d1
2+
git clone-rev.sh https://github.com/open-source-parsers/jsoncpp.git "$PROJECT/repo" 755d0a69d7109d465db6196a3c7e1c6f3c62a48f
33
git -C "$PROJECT/repo" apply ../patch_eh.patch
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set -e
2-
git clone-rev.sh https://github.com/mm2/Little-CMS.git "$PROJECT/repo" 4bf926a7905b27e863ad18bd7d40306b76e2f4d6
3-
git clone-rev.sh https://github.com/google/oss-fuzz.git "$PROJECT/oss-fuzz" d87225267726cf7ce1a3e17cf103c5ac943c4f05
2+
git clone-rev.sh https://github.com/mm2/Little-CMS.git "$PROJECT/repo" 21c582a594fe5279f90c0b93437c398f93bf62b0
3+
git clone-rev.sh https://github.com/google/oss-fuzz.git "$PROJECT/oss-fuzz" db53eebe19d09500c255d51c771ffb8ffa1f37ff

harness-suite/projects-clike/libarchive/libxml2-stub-dup.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
diff --git a/xmlIO.c b/xmlIO.c
2-
index cc861402..8a1f1756 100644
2+
index 416743b2..bef948df 100644
33
--- a/xmlIO.c
44
+++ b/xmlIO.c
5-
@@ -1088,7 +1088,11 @@ xmlInputFromFd(xmlParserInputBufferPtr buf, int fd, int flags) {
5+
@@ -1203,7 +1203,11 @@ xmlInputFromFd(xmlParserInputBuffer *buf, int fd,
66

7-
pos = lseek(fd, 0, SEEK_CUR);
7+
pos = xmlSeek(fd, 0, SEEK_CUR);
88

99
+#ifdef __wasi__
1010
+ copy = -1;
@@ -14,7 +14,7 @@ index cc861402..8a1f1756 100644
1414
if (copy == -1)
1515
return(xmlIOErr(errno));
1616

17-
@@ -1118,7 +1122,11 @@ xmlInputFromFd(xmlParserInputBufferPtr buf, int fd, int flags) {
17+
@@ -1235,7 +1239,11 @@ xmlInputFromFd(xmlParserInputBuffer *buf, int fd,
1818
}
1919
#endif /* LIBXML_ZLIB_ENABLED */
2020

@@ -27,7 +27,7 @@ index cc861402..8a1f1756 100644
2727
if (copy == -1)
2828
return(xmlIOErr(errno));
2929

30-
@@ -1198,7 +1206,11 @@ xmlOutputDefaultOpen(xmlOutputBufferPtr buf, const char *filename,
30+
@@ -1269,7 +1277,11 @@ xmlOutputDefaultOpen(xmlOutputBufferPtr buf, const char *filename,
3131
(void) compression;
3232

3333
if (!strcmp(filename, "-")) {

0 commit comments

Comments
 (0)