C utility functions for OpenWRT libraries
Find a file
Petr Štetiar 8e832a771d jshn: fix off by one in jshn_parse_file
Fixes following error:

 Invalid read of size 1
   at 0x4C32D04: strlen
   by 0x5043367: json_tokener_parse_ex
   by 0x5045316: json_tokener_parse_verbose
   by 0x504537D: json_tokener_parse
   by 0x401AB1: jshn_parse (jshn.c:179)
   by 0x40190D: jshn_parse_file (jshn.c:370)
   by 0x40190D: main (jshn.c:434)
 Address 0x5848c4c is 0 bytes after a block of size 1,036 alloc'd
   at 0x4C2FB0F: malloc
   by 0x4018E2: jshn_parse_file (jshn.c:357)
   by 0x4018E2: main (jshn.c:434)

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-11-24 13:26:58 +01:00
examples add cram based unit tests 2019-11-24 13:26:58 +01:00
lua libubox: allow reading out the pid of uloop process in lua 2016-12-13 17:13:20 +01:00
sh sh/jshn.sh: add json_for_each_item() 2018-02-08 12:15:20 +01:00
tests base64: fix possible null pointer dereference 2019-11-24 13:26:58 +01:00
.gitignore examples: add shunit2 tests for json_script 2016-02-20 13:36:08 +01:00
.gitlab-ci.yml add cram based unit tests 2019-11-24 13:26:58 +01:00
assert.h add assert.h component 2019-11-24 13:26:58 +01:00
avl-cmp.c avl: add blob comparator function 2016-07-29 10:58:55 +02:00
avl-cmp.h avl: add blob comparator function 2016-07-29 10:58:55 +02:00
avl.c avl: guard against theoretical null pointer dereference 2019-11-24 13:26:58 +01:00
avl.h switch from typeof to the more portable __typeof__ 2018-04-07 15:21:33 +02:00
base64.c base64: fix possible null pointer dereference 2019-11-24 13:26:58 +01:00
blob.c iron out all extra compiler warnings 2019-11-20 14:34:01 +01:00
blob.h iron out all extra compiler warnings 2019-11-20 14:34:01 +01:00
blobmsg.c iron out all extra compiler warnings 2019-11-20 14:34:01 +01:00
blobmsg.h fix segfault when passed blobmsg attr is NULL 2018-07-25 10:30:05 +02:00
blobmsg_json.c blobmsg_json: fix possible uninitialized struct member 2019-11-24 13:26:58 +01:00
blobmsg_json.h blobmsg_json: add new functions blobmsg_format_json_value* 2016-07-02 10:10:08 +02:00
CMakeLists.txt add cram based unit tests 2019-11-24 13:26:58 +01:00
jshn.c jshn: fix off by one in jshn_parse_file 2019-11-24 13:26:58 +01:00
json_script.c iron out all extra compiler warnings 2019-11-20 14:34:01 +01:00
json_script.h json_script: add support for aborting script processing 2015-11-06 22:58:15 +01:00
kvlist.c Fix various memory management issues 2016-06-26 12:53:51 +02:00
kvlist.h kvlist: add static initializer macros 2016-10-24 12:34:09 +02:00
list.h switch from typeof to the more portable __typeof__ 2018-04-07 15:21:33 +02:00
md5.c md5: add "const" qualifier to the "file" argument 2017-03-20 12:44:46 +01:00
md5.h md5: add "const" qualifier to the "file" argument 2017-03-20 12:44:46 +01:00
runqueue.c runqueue: fix use-after-free bug 2017-06-14 12:08:53 +02:00
runqueue.h libubox: add static initializer macro for runqueues 2016-07-29 12:01:37 +02:00
safe_list.c runqueue: add a function that allows adding jobs to the front of the runqueue 2013-11-18 12:25:21 +01:00
safe_list.h runqueue: add a function that allows adding jobs to the front of the runqueue 2013-11-18 12:25:21 +01:00
ulog.c libubox: replace strtok with _r version. 2016-12-24 11:03:29 +01:00
ulog.h libubox: add format string checking to ulog() 2019-06-16 16:29:47 +02:00
uloop-epoll.c uloop: remove useless epoll data assignment 2016-12-12 12:24:14 +01:00
uloop-kqueue.c uloop: use a waker for notifying sigchld and loop cancel events 2016-06-15 11:54:37 +02:00
uloop.c uloop: make SIGCHLD signal handling optional 2017-09-29 13:37:17 +02:00
uloop.h uloop: allow specifying a timeout for uloop_run() 2017-06-01 11:24:44 +02:00
usock.c usock: implement usock_inet_timeout() with RFC6555 support 2016-01-28 12:07:25 +01:00
usock.h usock: implement usock_inet_timeout() with RFC6555 support 2016-01-28 12:07:25 +01:00
ustream-fd.c ustream-fd: handle ENOTCONN for read/write on not-yet-connected sockets 2016-01-15 21:35:48 +01:00
ustream.c Fix various memory management issues 2016-06-26 12:53:51 +02:00
ustream.h ustream: Add format string checks to ustream_(v)printf() 2019-06-16 16:30:01 +02:00
utils.c libubox: Plug a small memory leak. 2018-02-11 16:39:35 +01:00
utils.h utils: add const_* byteswapping functions 2018-06-07 15:18:52 +02:00
vlist.c vlist: constify key argument to vlist_add 2013-10-05 21:40:04 +02:00
vlist.h vlist: add more macros for loop iteration 2019-10-29 13:07:38 +00:00