Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
qcommon: fix potential buffer overflow in COM_StripFilename
Browse files Browse the repository at this point in the history
  • Loading branch information
Exagone313 committed Jan 27, 2019
1 parent 7ac9dca commit 3eb7e8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qcommon/q_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void COM_StripFilename(const char *in, char *out)
{
char *end;

Q_strncpyz(out, in, strlen(in) + 1);
Q_strncpyz(out, in, MAX_QPATH);
end = COM_SkipPath(out);
*end = 0;
}
Expand Down

0 comments on commit 3eb7e8f

Please sign in to comment.