diff --git a/libs/models/alias/gl_model_alias.c b/libs/models/alias/gl_model_alias.c index 0dbafc42e..7d42c9e86 100644 --- a/libs/models/alias/gl_model_alias.c +++ b/libs/models/alias/gl_model_alias.c @@ -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; diff --git a/libs/util/quakeio.c b/libs/util/quakeio.c index 930343cf3..68f645e61 100644 --- a/libs/util/quakeio.c +++ b/libs/util/quakeio.c @@ -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)