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

Commit 3eb7e8f

Browse files
committed
qcommon: fix potential buffer overflow in COM_StripFilename
1 parent 7ac9dca commit 3eb7e8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qcommon/q_shared.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void COM_StripFilename(const char *in, char *out)
170170
{
171171
char *end;
172172

173-
Q_strncpyz(out, in, strlen(in) + 1);
173+
Q_strncpyz(out, in, MAX_QPATH);
174174
end = COM_SkipPath(out);
175175
*end = 0;
176176
}

0 commit comments

Comments
 (0)