Browse Source

- bugfix, malloc with correct size

- bugfix, missed memset
development
art1pirat 2 months ago
committed by Andreas Romeyke
parent
commit
7e8263e9ba
  1. 3
      src/helper/renderer/check_renderer_default.c

3
src/helper/renderer/check_renderer_default.c

@ -25,7 +25,7 @@ const char * renderer_default ( const retmsg_t * ret, short int is_quiet ) {
res->bufsize = RENDERMAXSIZE;
memset( res->buf, 0, RENDERMAXSIZE);
strbuff_t * tmp;
tmp = malloc( sizeof( tmp ) );
tmp = malloc( sizeof( strbuff_t ) );
if (NULL == tmp) {
exit(could_not_allocate_memory);
}
@ -87,6 +87,7 @@ const char * renderer_default ( const retmsg_t * ret, short int is_quiet ) {
} else {
res=secstrcat(res, tmp->buf);
}
memset(tmp->buf, 0, tmp->bufsize);
tmp->bufpos= tmp->buf;
tmp->pos = 0;
rc_is_valid =1;

Loading…
Cancel
Save