summaryrefslogtreecommitdiff
path: root/xs_json.h
diff options
context:
space:
mode:
Diffstat (limited to 'xs_json.h')
-rw-r--r--xs_json.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_json.h b/xs_json.h
index c171172..6af47a2 100644
--- a/xs_json.h
+++ b/xs_json.h
@@ -40,7 +40,7 @@ static xs_str *_xs_json_dumps_str(xs_str *s, const char *data)
40 if (c < 32) { 40 if (c < 32) {
41 char tmp[10]; 41 char tmp[10];
42 42
43 sprintf(tmp, "\\u%04x", (unsigned int) c); 43 snprintf(tmp, sizeof(tmp), "\\u%04x", (unsigned int) c);
44 s = xs_str_cat(s, tmp); 44 s = xs_str_cat(s, tmp);
45 } 45 }
46 else 46 else