You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2019/01/11 02:34:35 UTC

[kudu] 02/02: Do not fallthrough to next case upon parsing "\n" in JSON

This is an automated email from the ASF dual-hosted git repository.

mpercy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 389f997ed4c83f045a6dbc6823805cc5fc61b5e8
Author: Mike Parker <mi...@gmail.com>
AuthorDate: Fri Dec 11 00:24:36 2015 -0800

    Do not fallthrough to next case upon parsing "\n" in JSON
    
    Consequently an escaped "\r" would also be written out.
    
    Change-Id: I4827aa68f384bb30b8a03011b989ee775a317668
    Reviewed-on: http://gerrit.cloudera.org:8080/1623
    Tested-by: Kudu Jenkins
    Reviewed-by: Mike Percy <mp...@apache.org>
---
 src/kudu/util/debug/trace_event_impl.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/kudu/util/debug/trace_event_impl.cc b/src/kudu/util/debug/trace_event_impl.cc
index 155faf7..edec5c6 100644
--- a/src/kudu/util/debug/trace_event_impl.cc
+++ b/src/kudu/util/debug/trace_event_impl.cc
@@ -675,6 +675,7 @@ void JsonEscape(StringPiece s, string* out) {
         break;
       case '\n':
         out->append("\\n");
+        break;
       case '\r':
         out->append("\\r");
         break;