Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-12blobmsg: implicitly reserve space for 0-terminator in string buf allocFelix Fietkau
It may not be clear to all users of this API if the provided maxlen argument refers to the maximum string length or the maximum buffer size. In order to improve safety and convenience of this API, make it refer to the maximum string length. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-05-16json_script: fix unannotated fall-through warningFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-11-20iron out all extra compiler warningsPetr Štetiar
gcc-9 on x86/64 has reported following issues: base64.c:173:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:230:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:238:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:242:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:252:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:256:22: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:266:18: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:315:27: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] base64.c:329:15: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] blob.c:207:11: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] blob.c:210:11: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] blob.c:243:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] blob.c:246:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] blob.h:245:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] blob.h:253:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] blobmsg.h:269:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] blobmsg_json.c:155:10: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] examples/../blob.h:245:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] examples/../blobmsg.h:269:37: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] json_script.c:590:7: error: this statement may fall through [-Werror=implicit-fallthrough=] Signed-off-by: Petr Štetiar <ynezz@true.cz>
2017-06-01json_script: enable custom expr handler callbackDenis Osvald
This wires in custom expression handler functionality, which was present in json script since the original version, but never used. Signed-off-by: Denis Osvald <denis.osvald@sartura.hr> Signed-off-by: Felix Fietkau <nbd@nbd.name> [error handling fix]
2016-06-26Fix various memory management issuesMatthias Schiffer
Consistently handle allocation failures. Some functions are changed to return bool or int instead of void to allow returning an error. Also fix a buffer size miscalculation in lua/uloop and use _exit() instead of exit() on errors after forking. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-02-20json_script: add "isdir" supportYousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-11-08json_script: allow non-string types in command argumentsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-11-07json_script: add support for aborting script processingFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-12-22json_script: fix logic invert of handle_expr_not().Yousong Zhou
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-12-11json_script: remove unneed argument check before calling ↵Yousong Zhou
__json_script_file_free(). NULL check is present at the begining of function body. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-12-11json_script: fix eval_string().Yousong Zhou
- Fix handling of "%%". - Fix length requirement when calling blobmsg_realloc_string_buffer(). Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-05-26json_script: fix a segfault in the file free handlerFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-28json_script: add json_script_run_file()Felix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-28json_script: implement json_script_eval_stringFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-03-02json_script: do not rely on global includes for other libubox header filesFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-03-01add json_script, a minimalistic JSON based script interpreterFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org>