From 9f0482dafcb1925952c0d9a614db264f0fa5428e Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 21 Aug 2017 23:04:40 -0400 Subject: [PATCH] Prevent possibility of crash --- CHANGELOG.md | 4 ++++ include/cyclone/types.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4276ef64..a0207d07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.6.1 - TBD +Bug Fixes + +- Fix possibility of crashing when calling `close-port`. + ## 0.6 - August 21, 2017 Features diff --git a/include/cyclone/types.h b/include/cyclone/types.h index 6139a906..647f4ba3 100644 --- a/include/cyclone/types.h +++ b/include/cyclone/types.h @@ -813,6 +813,8 @@ typedef struct { p.tok_buf_len = 0; \ p.mem_buf = NULL; \ p.mem_buf_len = 0; \ + p.str_bv_in_mem_buf = NULL; \ + p.str_bv_in_mem_buf_len = 0; \ p.read_len = 1; #define make_input_port(p,f,rl) \ @@ -832,6 +834,8 @@ typedef struct { p.tok_buf_len = CYC_IO_BUF_LEN; \ p.mem_buf = malloc(CYC_IO_BUF_LEN); \ p.mem_buf_len = 0; \ + p.str_bv_in_mem_buf = NULL; \ + p.str_bv_in_mem_buf_len = 0; \ p.read_len = rl; /**