Commit Graph

12 Commits (master)

Author SHA1 Message Date
cinap_lenrek d8d47f14b5 libjson: add slack space to literal string buffer to handle bad runes (thanks mischief)
if the input string contains invalid utf-8, runetochar() produces
unicode replacement characters that can overflow the literal buffer.
as the overflow check is done after runetochar(), add UTFmax bytes
of slack space avoiding the issue.
2016-04-27 12:59:06 +02:00
cinap_lenrek a53ae2782a libjson: added printing support (thanks spew) 2015-12-22 18:12:56 +01:00
cinap_lenrek f6e8b115d4 libjson: fix memory leak setjmp/longjmp problem (thanks spew)
spew → I fixed the memory leak setjmp/longjmp problem with libjson
spew → http://www.spew.club/json.patch
spew → full file: http://www.spew.club/json.c
spew → going to bed, I'll annoy cinap_lenrek tomorrow to try to get this committed
2015-12-22 17:00:00 +01:00
BurnZeZ 983413de75 libjson: don't perform chartorune in getch() when char is null terminator, and remove empty string check added last commit 2013-11-10 03:35:25 -05:00
BurnZeZ f0483642be libjson: check for empty string in jsonparse() 2013-11-10 20:11:46 -05:00
BurnZeZ 96c1e08f48 libjson: fix missing buffer free, slight cleanup 2013-10-28 03:17:53 -04:00
BurnZeZ a8e8b650f3 libjson: dynamically allocate buffer 2013-10-28 23:21:07 -04:00
cinap_lenrek 4ea791806c libjson: fix mistake... (harmless) 2013-10-28 01:24:03 +01:00
cinap_lenrek ffd3421cf0 libjson: fix for 21 bit runes, implement utf-16 surrogates 2013-10-28 01:19:01 +01:00
BurnZeZ abb8ce3878 libjson: fix mistake in unicode handler (thanks cinap) 2013-10-27 19:29:02 -04:00
BurnZeZ b1bc8b5c2b libjson: handle unicode escapes 2013-10-27 15:52:35 -04:00
BurnZeZ 2dc7e311f4 make libjson from /sys/src/cmd/btc/json.c 2013-10-27 15:44:33 -04:00