mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
strcpy->memcpy in util_getline
This commit is contained in:
parent
0c74f8fdb9
commit
c3bcfe84b0
1 changed files with 1 additions and 1 deletions
2
util.c
2
util.c
|
@ -344,8 +344,8 @@ int util_getline(char **lineptr, size_t *n, FILE *stream) {
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
memcpy(tmp, *lineptr, pos - *lineptr);
|
||||||
chr = *n + *lineptr - pos;
|
chr = *n + *lineptr - pos;
|
||||||
strcpy(tmp,*lineptr);
|
|
||||||
if (!(*lineptr = tmp)) {
|
if (!(*lineptr = tmp)) {
|
||||||
mem_d (tmp);
|
mem_d (tmp);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue