diff options
author | Rahul Paknikar | 2019-07-07 17:05:50 +0530 |
---|---|---|
committer | GitHub | 2019-07-07 17:05:50 +0530 |
commit | 57ac333e92ddc237b1d107ceadc03afc3d32535f (patch) | |
tree | 15392331b7580b0d5d62fe195df7a357f234227e /src | |
parent | 608762b6aa6f63858e67cdf13cbfd94f698f53c5 (diff) | |
download | nghdl-57ac333e92ddc237b1d107ceadc03afc3d32535f.tar.gz nghdl-57ac333e92ddc237b1d107ceadc03afc3d32535f.tar.bz2 nghdl-57ac333e92ddc237b1d107ceadc03afc3d32535f.zip |
solved infinite loop, greater buffer size
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdlserver/ghdlserver.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ghdlserver/ghdlserver.c b/src/ghdlserver/ghdlserver.c index 2860ad8..ac34a87 100644 --- a/src/ghdlserver/ghdlserver.c +++ b/src/ghdlserver/ghdlserver.c @@ -411,7 +411,7 @@ static void Data_Send(int sockid) s = NULL; int found = 0; - out = calloc(1, 1024); + out = calloc(1, 2048); for (i=0; i<out_port_num; i++) { @@ -439,6 +439,7 @@ static void Data_Send(int sockid) free(out); return; } + } while(1) @@ -558,8 +559,8 @@ void Vhpi_Set_Port_Value(char *port_name,char *port_value,int port_width) { s = (struct my_struct*)malloc(sizeof(struct my_struct)); - strncpy(s->key, port_name,10); - strncpy(s->val,port_value,10); + strncpy(s->key, port_name,64); + strncpy(s->val,port_value,64); HASH_ADD_STR( users, key, s ); } |