aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/mem.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-10 16:06:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-21 20:43:37 +0200
commitdc8f42e0374df901696edc9855b7cd208f9ea12d (patch)
treeb0e6ed7e9258fd5fa40757b8522fe53939765e4c /libavutil/mem.c
parentbb523c1b8666905f5101022c45fdffd19cbbea83 (diff)
downloadffmpeg-dc8f42e0374df901696edc9855b7cd208f9ea12d.tar.gz
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> (cherry picked from commit 4950bd4ebedbb6289734234bb2a719820f565c41) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/mem.c')
-rw-r--r--libavutil/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 35a82e8a2d..9dc1ac7a49 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -259,7 +259,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);