[FFmpeg-cvslog] libavutil/mem: use size_t for the length in av_strdup()
Michael Niedermayer
git at videolan.org
Wed Jun 17 22:09:36 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Sun May 10 16:06:50 2015 +0200| [9f9af1dd04fb0b8359f229d407d4f98515f25460] | committer: Michael Niedermayer
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 at gmx.at>
(cherry picked from commit 4950bd4ebedbb6289734234bb2a719820f565c41)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f9af1dd04fb0b8359f229d407d4f98515f25460
---
libavutil/mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 10b0137..e50df1e 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -258,7 +258,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);
More information about the ffmpeg-cvslog
mailing list