Browse Source

- bugfix, fixed a potential address violation (because we should first check count, then pointer)

pull/3/head
Andreas Romeyke 4 years ago
parent
commit
7eb03f4f7d
  1. 6
      src/helper/check_renderer.c

6
src/helper/check_renderer.c

@ -132,7 +132,11 @@ const char * renderer_ansi ( ret_t ret ) {
}
retmsg_t * startp = ret.returnmsg;
int c = 0;
while (NULL != startp && NULL != startp->rm_msg && c < ret.count) {
while (
(c < ret.count) &&
(NULL != startp) &&
(NULL != startp->rm_msg)
) {
switch (startp->rm_type) {
case rm_rule: secstrcat( res, ANSI_NORMAL , 1024); break;
case rm_tag: secstrcat( res, ANSI_BOLD , 1024); break;

Loading…
Cancel
Save