kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 1c8836b2e1068874b0a58ee7f3cd2060d43ab139
parent 0c0393fc649866e477f94c639138320d0fdf69b1
Author: Joris Vink <joris@coders.se>
Date:   Sat, 13 Feb 2016 14:35:11 +0100

Add precaution against calling kore_split_string with ele == 0

Diffstat:
src/utils.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/utils.c b/src/utils.c @@ -209,6 +209,9 @@ kore_split_string(char *input, char *delim, char **out, size_t ele) int count; char **ap; + if (ele == 0) + fatal("kore_split_string: ele == 0"); + count = 0; for (ap = out; ap < &out[ele - 1] && (*ap = strsep(&input, delim)) != NULL;) {