[FFmpeg-cvslog] Revert "avprobe: Zero the allocated avio buffer memory"
Vittorio Giovara
git at videolan.org
Thu Feb 2 12:28:55 EET 2017
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Jul 21 21:45:25 2016 +0200| [6135c3b61e084be93c0876cecd06f4e764f961c0] | committer: Vittorio Giovara
Revert "avprobe: Zero the allocated avio buffer memory"
This reverts commit 0e0538aefc75958ded49f5d075c99a81cf6b2bbb.
The valgrind warning was a false positive due to OSX implementation of
printf (invoking a strnlen), while this code is actually fine, since the
format specifier %.*s guarantes that no more than buf_size bytes from
buf will be read.
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6135c3b61e084be93c0876cecd06f4e764f961c0
---
avprobe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/avprobe.c b/avprobe.c
index 5b9a7ec..abaaee1 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -1039,7 +1039,7 @@ static int probe_buf_write(void *opaque, uint8_t *buf, int buf_size)
int main(int argc, char **argv)
{
int ret;
- uint8_t *buffer = av_mallocz(AVP_BUFFSIZE);
+ uint8_t *buffer = av_malloc(AVP_BUFFSIZE);
if (!buffer)
exit(1);
More information about the ffmpeg-cvslog
mailing list