Control: tags 1016229 + patch Control: tags 1016229 + pending Dear maintainer,
I've prepared an NMU for rapidjson (versioned as 1.1.0+dfsg2-7.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Regards, Reiner
diff -Nru rapidjson-1.1.0+dfsg2/debian/changelog rapidjson-1.1.0+dfsg2/debian/changelog --- rapidjson-1.1.0+dfsg2/debian/changelog 2021-01-07 14:45:27.000000000 +0100 +++ rapidjson-1.1.0+dfsg2/debian/changelog 2022-10-15 18:10:14.000000000 +0200 @@ -1,3 +1,10 @@ +rapidjson (1.1.0+dfsg2-7.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 12. (Closes: #1016229) + + -- Reiner Herrmann <rei...@reiner-h.de> Sat, 15 Oct 2022 18:10:14 +0200 + rapidjson (1.1.0+dfsg2-7) unstable; urgency=medium * Do not use -arch=native on ppc64 and cross-compilation: diff -Nru rapidjson-1.1.0+dfsg2/debian/patches/gcc12_encdedstreamtest.patch rapidjson-1.1.0+dfsg2/debian/patches/gcc12_encdedstreamtest.patch --- rapidjson-1.1.0+dfsg2/debian/patches/gcc12_encdedstreamtest.patch 1970-01-01 01:00:00.000000000 +0100 +++ rapidjson-1.1.0+dfsg2/debian/patches/gcc12_encdedstreamtest.patch 2022-10-15 18:10:14.000000000 +0200 @@ -0,0 +1,22 @@ +From 2b2c80450031028439ba2a17a09ef5aa10f2159b Mon Sep 17 00:00:00 2001 +From: Tom Briden <t...@decompile.me.uk> +Date: Sun, 15 May 2022 10:20:21 +0100 +Subject: [PATCH] encdedstreamtest: fix use-after-free compile error with + gcc-12 + +--- + test/unittest/encodedstreamtest.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/test/unittest/encodedstreamtest.cpp ++++ b/test/unittest/encodedstreamtest.cpp +@@ -113,8 +113,8 @@ + EXPECT_EQ(expected, actual); + } + EXPECT_EQ('\0', s.Peek()); +- free(data); + EXPECT_EQ(size, eis.Tell()); ++ free(data); + } + } + diff -Nru rapidjson-1.1.0+dfsg2/debian/patches/gcc12_valuetest.patch rapidjson-1.1.0+dfsg2/debian/patches/gcc12_valuetest.patch --- rapidjson-1.1.0+dfsg2/debian/patches/gcc12_valuetest.patch 1970-01-01 01:00:00.000000000 +0100 +++ rapidjson-1.1.0+dfsg2/debian/patches/gcc12_valuetest.patch 2022-10-15 18:10:14.000000000 +0200 @@ -0,0 +1,34 @@ +From 1f59c69cd18cd508395fe0bb5c2f8ee909e3c48d Mon Sep 17 00:00:00 2001 +From: Tom Briden <t...@decompile.me.uk> +Date: Sun, 15 May 2022 10:15:26 +0100 +Subject: [PATCH] valuetest: fix potential write of terminating nul past the + end of the destination + +Fixes 2 compile errors with gcc-12, eg: + +tesunittest/valuetest.cpp:1516:30: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=format-overflow=] +test/unittest/valuetest.cpp:1516:20: note: 'sprintf' output between 2 and 11 bytes into a destination of size 10 +--- + test/unittest/valuetest.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/test/unittest/valuetest.cpp ++++ b/test/unittest/valuetest.cpp +@@ -1512,7 +1512,7 @@ + { + int i = 0; + for (auto& m : x.GetObject()) { +- char name[10]; ++ char name[11]; + sprintf(name, "%d", i); + EXPECT_STREQ(name, m.name.GetString()); + EXPECT_EQ(i, m.value.GetInt()); +@@ -1523,7 +1523,7 @@ + { + int i = 0; + for (const auto& m : const_cast<const Value&>(x).GetObject()) { +- char name[10]; ++ char name[11]; + sprintf(name, "%d", i); + EXPECT_STREQ(name, m.name.GetString()); + EXPECT_EQ(i, m.value.GetInt()); diff -Nru rapidjson-1.1.0+dfsg2/debian/patches/series rapidjson-1.1.0+dfsg2/debian/patches/series --- rapidjson-1.1.0+dfsg2/debian/patches/series 2021-01-07 14:42:47.000000000 +0100 +++ rapidjson-1.1.0+dfsg2/debian/patches/series 2022-10-15 18:10:14.000000000 +0200 @@ -10,3 +10,5 @@ 0001-support-IBM-PowerPC-ppc64-ppc64le-and-XL-compiler.patch 0001-CMake-do-not-pass-march-native-or-mcpu-native-when-c.patch deal-with-Werror-type-limits.patch +gcc12_encdedstreamtest.patch +gcc12_valuetest.patch