Fixes after coverity static analysis

This commit is contained in:
Olof hagsand 2024-03-03 17:05:36 +01:00
parent d94b4f5b7c
commit a1badc312e
24 changed files with 148 additions and 70 deletions

View file

@ -501,7 +501,7 @@ clixon_err_restore(void* handle)
if ((es = (struct err_state *)handle) != NULL){
_err_category = es->es_category;
_err_subnr = es->es_subnr;
strncpy(_err_reason, es->es_reason, ERR_STRLEN);
strncpy(_err_reason, es->es_reason, ERR_STRLEN-1);
free(es);
}
return 0;