Skip to content

Commit 9202bd3

Browse files
committed
Fix potential segfault on apache
1 parent f814124 commit 9202bd3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/redirectionio_protocol.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ static apr_status_t redirectionio_read_json_handler(redirectionio_connection *co
186186
*buffer = '\0';
187187
*json = cJSON_Parse((char *)(buffer - len));
188188

189+
if (*json == NULL) {
190+
return APR_EOF;
191+
}
192+
189193
apr_pool_cleanup_register(
190194
pool,
191195
*json,

0 commit comments

Comments
 (0)