Skip to content

Commit

Permalink
db_text: Add coverity tag
Browse files Browse the repository at this point in the history
CID #417446, #417475
  • Loading branch information
oanatitoc committed Sep 25, 2024
1 parent 9cd4a58 commit 68b0746
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/db_text/dbt_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ dbt_table_p dbt_load_file(const str *tbn, const str *dbn)
strncpy(path, dbn->s, dbn->len);
path[dbn->len] = '/';
strncpy(path+dbn->len+1, tbn->s, tbn->len);

/* coverity[overrun-local: FALSE] */
path[dbn->len+tbn->len+1] = 0;
}
}
Expand Down Expand Up @@ -565,6 +567,8 @@ int dbt_print_table(dbt_table_p _dtp, str *_dbn)
strncpy(path, _dbn->s, _dbn->len);
path[_dbn->len] = '/';
strncpy(path+_dbn->len+1, _dtp->name.s, _dtp->name.len);

/* coverity[overrun-local: FALSE] */
path[_dbn->len+_dtp->name.len+1] = 0;
fout = fopen(path, "wt");
if(!fout)
Expand Down

0 comments on commit 68b0746

Please sign in to comment.