Browse Source

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>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
4950bd4ebe
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/mem.c

+ 1
- 1
libavutil/mem.c View File

@@ -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…
Cancel
Save