OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f5095f
)
avcodec/utils: Fix off by 1 error causing unneeded allocation in ff_fast_malloc()
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 29 Sep 2014 03:41:54 +0000
(
05:41
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 29 Sep 2014 10:56:45 +0000
(12:56 +0200)
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/utils.c
patch
|
blob
|
history
diff --git
a/libavcodec/utils.c
b/libavcodec/utils.c
index
b27f918
..
9eb2b5b
100644
(file)
--- a/
libavcodec/utils.c
+++ b/
libavcodec/utils.c
@@
-122,7
+122,7
@@
static void *avformat_mutex;
static inline int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_realloc)
{
void **p = ptr;
- if (min_size <
*size
)
+ if (min_size <
= *size && *p
)
return 0;
min_size = FFMAX(17 * min_size / 16 + 32, min_size);
av_free(*p);