mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
fix a buffer overflow and an underflow
This commit is contained in:
parent
249aee2e9f
commit
629e22aa61
2 changed files with 2 additions and 2 deletions
|
@ -185,7 +185,7 @@ Mod_LoadAliasFrame (void *pin, int *posenum, maliasframedesc_t *frame,
|
|||
|
||||
pdaliasframe = (daliasframe_t *) pin;
|
||||
|
||||
strcpy (frame->name, pdaliasframe->name);
|
||||
strncpy (frame->name, pdaliasframe->name, sizeof (frame->name));
|
||||
frame->firstpose = (*posenum);
|
||||
frame->numposes = 1;
|
||||
|
||||
|
|
|
@ -514,7 +514,7 @@ Qgetline (QFile *file)
|
|||
return 0;
|
||||
|
||||
len = strlen (buf);
|
||||
while (buf[len - 1] != '\n') {
|
||||
while (len && buf[len - 1] != '\n') {
|
||||
char *t = realloc (buf, size + 256);
|
||||
|
||||
if (!t)
|
||||
|
|
Loading…
Reference in a new issue