OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c3dff6
)
* allocate slightly more data - so decoders won't be touching memory
author
Zdenek Kabelac
<kabi@informatics.muni.cz>
Tue, 5 Nov 2002 12:06:37 +0000
(12:06 +0000)
committer
Zdenek Kabelac
<kabi@informatics.muni.cz>
Tue, 5 Nov 2002 12:06:37 +0000
(12:06 +0000)
out of allocated range (would be 4 bytes enough here ???)
Originally committed as revision 1168 to svn://svn.ffmpeg.org/ffmpeg/trunk
libav/utils.c
patch
|
blob
|
history
diff --git
a/libav/utils.c
b/libav/utils.c
index
d7cf658
..
8a609a9
100644
(file)
--- a/
libav/utils.c
+++ b/
libav/utils.c
@@
-147,7
+147,8
@@
AVInputFormat *av_find_input_format(const char *short_name)
*/
int av_new_packet(AVPacket *pkt, int size)
{
- pkt->data = av_malloc(size);
+ int64_t* p;
+ pkt->data = av_malloc(size + 9);
if (!pkt->data)
return AVERROR_NOMEM;
pkt->size = size;
@@
-155,6
+156,8
@@
int av_new_packet(AVPacket *pkt, int size)
pkt->pts = AV_NOPTS_VALUE;
pkt->stream_index = 0;
pkt->flags = 0;
+ p = (int64_t*)&pkt->data[size];
+ *p = 0;
return 0;
}