fixed a potential in set_err_with_syserr in hcl-s.c

This commit is contained in:
2018-03-14 14:54:10 +00:00
parent de534fed83
commit b7434aa976
2 changed files with 15 additions and 17 deletions

View File

@ -992,6 +992,8 @@ struct hcl_synerr_t
typedef struct hcl_compiler_t hcl_compiler_t;
#endif
#define HCL_ERRMSG_CAPA 2048
struct hcl_t
{
hcl_mmgr_t* mmgr;
@ -1002,11 +1004,11 @@ struct hcl_t
{
union
{
hcl_ooch_t ooch[2048];
hcl_bch_t bch[2048];
hcl_uch_t uch[2048];
hcl_ooch_t ooch[HCL_ERRMSG_CAPA];
hcl_bch_t bch[HCL_ERRMSG_CAPA];
hcl_uch_t uch[HCL_ERRMSG_CAPA];
} tmpbuf;
hcl_ooch_t buf[2048];
hcl_ooch_t buf[HCL_ERRMSG_CAPA];
hcl_oow_t len;
} errmsg;
int shuterr;