]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
json escaping fix
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 30 Aug 2011 00:12:03 +0000 (17:12 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 30 Aug 2011 00:12:03 +0000 (17:12 -0700)
src/common/escape.c

index 95a7540ffcdfa5363ea4ad706054f13969ae05ee..585961e02a101fd37f84cb12389eeefc91313702 100644 (file)
@@ -185,7 +185,7 @@ void escape_json_attr(const char *buf, char *out)
                default:
                        // Escape control characters.
                        if ((c < 0x20) || (c == 0x7f)) {
-                               snprintf(o, 6, "\\u%04x", c);
+                               snprintf(o, 7, "\\u%04x", c);
                                o += 6;
                        }
                        else {