diff options
| author | 2023-04-19 22:53:07 +0200 | |
|---|---|---|
| committer | 2023-04-19 22:53:07 +0200 | |
| commit | d55db283902ba81c91ae7842c53d81bd0d7dd6f6 (patch) | |
| tree | 19e2dbb8263b7c06066b3c43e2c20cf01f09aca6 /xs_json.h | |
| parent | arc4random() does not exist in not-so-old systems, so revert this. (diff) | |
| download | penes-snac2-d55db283902ba81c91ae7842c53d81bd0d7dd6f6.tar.gz penes-snac2-d55db283902ba81c91ae7842c53d81bd0d7dd6f6.tar.xz penes-snac2-d55db283902ba81c91ae7842c53d81bd0d7dd6f6.zip | |
Backport from xs.
Diffstat (limited to 'xs_json.h')
| -rw-r--r-- | xs_json.h | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -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 |