[Python-modules-commits] r14383 - in packages/python-cjson/trunk/debian/patches (1 file)

bzed at users.alioth.debian.org bzed at users.alioth.debian.org
Mon Sep 6 20:19:08 UTC 2010


    Date: Monday, September 6, 2010 @ 20:19:03
  Author: bzed
Revision: 14383

adding patch.

Added:
  packages/python-cjson/trunk/debian/patches/0002-fix-for-CVE-2009-4924

Added: packages/python-cjson/trunk/debian/patches/0002-fix-for-CVE-2009-4924
===================================================================
--- packages/python-cjson/trunk/debian/patches/0002-fix-for-CVE-2009-4924	                        (rev 0)
+++ packages/python-cjson/trunk/debian/patches/0002-fix-for-CVE-2009-4924	2010-09-06 20:19:03 UTC (rev 14383)
@@ -0,0 +1,29 @@
+diff -r 026bff5ea1ed -r 88b854ad1437 cjson.c
+--- a/cjson.c	Tue Jul 27 19:54:30 2010 +0200
++++ b/cjson.c	Tue Jul 27 20:35:58 2010 +0200
+@@ -570,6 +570,8 @@
+                 *p++ = '\\', *p++ = c;
+             else if (c == '\t')
+                 *p++ = '\\', *p++ = 't';
++            else if (c == '/')
++                *p++ = '\\', *p++ = '/';
+             else if (c == '\n')
+                 *p++ = '\\', *p++ = 'n';
+             else if (c == '\r')
+diff -r 026bff5ea1ed -r 88b854ad1437 jsontest.py
+--- a/jsontest.py	Tue Jul 27 19:54:30 2010 +0200
++++ b/jsontest.py	Tue Jul 27 20:35:58 2010 +0200
+@@ -89,12 +89,7 @@
+ 
+     def testWriteEscapedSolidus(self):
+         s = cjson.encode(r'/')
+-        #self.assertEqual(r'"\/"', _removeWhitespace(s))
+-        self.assertEqual('"/"', _removeWhitespace(s))
+-
+-    def testWriteNonEscapedSolidus(self):
+-        s = cjson.encode(r'/')
+-        self.assertEqual(r'"/"', _removeWhitespace(s))
++        self.assertEqual(r'"\/"', _removeWhitespace(s))
+ 
+     def testWriteEscapedReverseSolidus(self):
+         s = cjson.encode("\\")




More information about the Python-modules-commits mailing list