kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit b54b93536d177ded1f2935c76c533dc1d83b70c1
parent c32880e12b4e8d5c93d50d9a04694dee728a0196
Author: Joris Vink <joris@coders.se>
Date:   Tue, 27 Aug 2019 13:12:44 +0200

Use strdup() when munging environment pointers.

Diffstat:
src/kore.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/kore.c b/src/kore.c @@ -655,7 +655,8 @@ kore_proctitle_setup(void) proctitle_maxlen = 0; for (i = 0; environ[i] != NULL; i++) { - p = kore_strdup(environ[i]); + if ((p = strdup(environ[i])) == NULL) + fatal("strdup"); proctitle_maxlen += strlen(environ[i]) + 1; environ[i] = p; }