mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
libavutil/mem: use size_t for the length in av_strdup()
the string length is not constrained to INT_MAX Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
54e64eaf68
commit
4950bd4ebe
@ -266,7 +266,7 @@ char *av_strdup(const char *s)
|
||||
{
|
||||
char *ptr = NULL;
|
||||
if (s) {
|
||||
int len = strlen(s) + 1;
|
||||
size_t len = strlen(s) + 1;
|
||||
ptr = av_realloc(NULL, len);
|
||||
if (ptr)
|
||||
memcpy(ptr, s, len);
|
||||
|
Loading…
Reference in New Issue
Block a user