couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [1/5] git commit: updated refs/heads/master to c843cef
Date Sat, 03 Aug 2013 16:58:36 GMT
Updated Branches:
  refs/heads/master fb78b466b -> c843cef7e


COUCHDB-1493 include yajl patch in EJSON to avoid skipping unicode zero byte values


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/02416a1b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/02416a1b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/02416a1b

Branch: refs/heads/master
Commit: 02416a1bcb12fa7391cceddd0268e1c2f2a3fc01
Parents: 73db817
Author: Dave Cottlehuber <dch@apache.org>
Authored: Mon Apr 8 12:32:32 2013 +0200
Committer: Dave Cottlehuber <dch@apache.org>
Committed: Wed May 15 00:19:29 2013 +0200

----------------------------------------------------------------------
 src/ejson/yajl/yajl_encode.c | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/02416a1b/src/ejson/yajl/yajl_encode.c
----------------------------------------------------------------------
diff --git a/src/ejson/yajl/yajl_encode.c b/src/ejson/yajl/yajl_encode.c
index ad5b1c5..d5b2b8f 100644
--- a/src/ejson/yajl/yajl_encode.c
+++ b/src/ejson/yajl/yajl_encode.c
@@ -173,6 +173,13 @@ void yajl_string_decode(yajl_buf buf, const unsigned char * str,
                     
                     Utf32toUtf8(codepoint, utf8Buf);
                     unescaped = utf8Buf;
+
+                    if (codepoint == 0) {
+                        yajl_buf_append(buf, unescaped, 1);
+                        beg = ++end;
+                        continue;
+                    }
+
                     break;
                 }
                 default:


Mime
View raw message