Skip to content

Commit

Permalink
Cast to size_t
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <[email protected]>
  • Loading branch information
cole-miller committed Jan 29, 2024
1 parent c355671 commit 07111dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vfs2.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,10 @@ static int vfs2_open_wal(sqlite3_vfs *vfs,
}

/* Open the two physical WALs */
strncpy(fixed1, name, dash - name);
strncpy(fixed1, name, (size_t)(dash - name));
fixed1[dash - name] = '\0';
strcat(fixed1, VFS2_WAL_FIXED_SUFFIX1);
strncpy(fixed2, name, dash - name);
strncpy(fixed2, name, (size_t)(dash - name));
fixed2[dash - name] = '\0';
strcat(fixed2, VFS2_WAL_FIXED_SUFFIX2);
int out_flags1, out_flags2;
Expand Down

0 comments on commit 07111dc

Please sign in to comment.