Skip to content

Commit

Permalink
v.rectify: Fix Copy into fix Buffer size issue (#4463)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamDesai authored Oct 7, 2024
1 parent aa0b497 commit b5c4a27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vector/v.rectify/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ int main(int argc, char *argv[])

if (grp->answer) {
G_strip(grp->answer);
strcpy(group, grp->answer);
if (G_strlcpy(group, grp->answer, sizeof(group)) >= sizeof(group)) {
G_fatal_error(_("Group name <%s> is too long"), grp->answer);
}
}
else
group[0] = '\0';
Expand Down

0 comments on commit b5c4a27

Please sign in to comment.