Bug#733974: Crash when browsing the public server list in Minetest

Markus Koschany apo at gambaru.de
Mon Nov 17 18:20:34 UTC 2014


On Thu, 3 Jul 2014 09:02:18 +0200 Martin Quinson
<martin.quinson at loria.fr> wrote:
> On Sun, Jun 22, 2014 at 05:01:15PM +1000, Matthew Bekkema wrote:
> > I found out what changes to libjsoncpp allow everything to work. I
> > don't have access to Debian Sid at the moment so I've only tested this
> > on Wheezy.
> 
> I just opened a bug against libjsoncpp (#753560) to ask for the
> inclusion of that patch. Thanks very much for sorting that out, your
> precious work is really appreciated.
> 
> Bye, Mt.


Hi,

I have recently spent some time to learn more about Minetest. This bug
is a serious issue because it prevents players from browsing the public
server list. Since Minetest is a multiplayer online game, this is really
a show-stopper for a lot of people including myself. Obviously the bug
itself lies in libjsoncpp.

I am going to merge #733974 with #753560 and raise the severity to
serious. The patch from Matthew Bekkema works. I am attaching the
debdiff to this bug report.

Regards,

Markus
-------------- next part --------------
diff -Nru libjsoncpp-0.6.0~rc2/debian/changelog libjsoncpp-0.6.0~rc2/debian/changelog
--- libjsoncpp-0.6.0~rc2/debian/changelog	2012-05-09 19:58:00.000000000 +0200
+++ libjsoncpp-0.6.0~rc2/debian/changelog	2014-11-17 19:07:10.000000000 +0100
@@ -1,3 +1,12 @@
+libjsoncpp (0.6.0~rc2-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add value-as-string.patch. (Closes: #753560)
+    Fix conversion of numerical values to string that caused crashes in
+    reverse-dependencies such as Minetest.
+
+ -- Markus Koschany <apo at gambaru.de>  Mon, 17 Nov 2014 19:05:20 +0100
+
 libjsoncpp (0.6.0~rc2-3) unstable; urgency=low
 
   * Bug fix: "ftbfs with GCC-4.7", thanks to Matthias Klose (Closes: #667246).
diff -Nru libjsoncpp-0.6.0~rc2/debian/patches/series libjsoncpp-0.6.0~rc2/debian/patches/series
--- libjsoncpp-0.6.0~rc2/debian/patches/series	2011-11-21 18:24:33.000000000 +0100
+++ libjsoncpp-0.6.0~rc2/debian/patches/series	2014-11-17 19:07:10.000000000 +0100
@@ -1 +1,2 @@
 fix-SConstruct-soname.patch
+value-as-String.patch
diff -Nru libjsoncpp-0.6.0~rc2/debian/patches/value-as-String.patch libjsoncpp-0.6.0~rc2/debian/patches/value-as-String.patch
--- libjsoncpp-0.6.0~rc2/debian/patches/value-as-String.patch	1970-01-01 01:00:00.000000000 +0100
+++ libjsoncpp-0.6.0~rc2/debian/patches/value-as-String.patch	2014-11-17 19:07:10.000000000 +0100
@@ -0,0 +1,44 @@
+From: Matthew Bekkema <mbekkema97 at gmail.com>
+Date: Mon, 17 Nov 2014 18:59:47 +0100
+Subject: value as String
+
+Fix return value of integers. Already fixed in the latest upstream version.
+This also fixes a Minetest crash when browsing the public serverlist.
+https://bugs.debian.org/733974
+
+Bug: https://bugs.debian.org/753560
+Forwarded: not-needed
+
+---
+ src/lib_json/json_value.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp
+index ff98f63..7151181 100644
+--- a/src/lib_json/json_value.cpp
++++ b/src/lib_json/json_value.cpp
+@@ -666,6 +666,7 @@ Value::asString() const
+    case booleanValue:
+       return value_.bool_ ? "true" : "false";
+    case intValue:
++      return valueToString( value_.int_ );
+    case uintValue:
+    case realValue:
+    case arrayValue:
+@@ -1423,14 +1424,14 @@ Value::isString() const
+ bool 
+ Value::isArray() const
+ {
+-   return type_ == nullValue  ||  type_ == arrayValue;
++   return type_ == arrayValue;
+ }
+ 
+ 
+ bool 
+ Value::isObject() const
+ {
+-   return type_ == nullValue  ||  type_ == objectValue;
++   return type_ == objectValue;
+ }
+ 
+ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20141117/920bea62/attachment-0001.sig>


More information about the Pkg-games-devel mailing list