mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 12:10:48 +00:00
plug another overflow
This commit is contained in:
parent
d4a4cde83c
commit
8fc721a2bb
1 changed files with 3 additions and 2 deletions
|
@ -50,10 +50,11 @@ new_string_ref (progs_t *pr)
|
|||
{
|
||||
strref_t *sr;
|
||||
if (!pr->free_string_refs) {
|
||||
int i;
|
||||
int i, size;
|
||||
|
||||
pr->dyn_str_size++;
|
||||
pr->dynamic_strings = realloc (pr->dynamic_strings, pr->dyn_str_size);
|
||||
size = pr->dyn_str_size * sizeof (strref_t *);
|
||||
pr->dynamic_strings = realloc (pr->dynamic_strings, size);
|
||||
if (!pr->dynamic_strings)
|
||||
PR_Error (pr, "out of memory");
|
||||
if (!(pr->free_string_refs = calloc (1024, sizeof (strref_t))))
|
||||
|
|
Loading…
Reference in a new issue