aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorBen Avison <bavison@riscosopen.org>2013-08-07 23:22:38 +0100
committerMartin Storsjö <martin@martin.st>2013-08-08 11:09:00 +0300
commit5afe1d27912be9b643ffb4ddc21f6d920260dbb0 (patch)
tree4188a4cbcecdec1af0f534d06e55fef14dab3a4c /libavformat/aviobuf.c
parent0f1fb6c0194c85483dedb93b20a5b76f6fc9d520 (diff)
downloadffmpeg-5afe1d27912be9b643ffb4ddc21f6d920260dbb0.tar.gz
avio: Add const qualifiers to ffio_read_indirect
This provides at least some protection against potential accidental corruption of AVIO buffer workspace. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 07aa88068f..2354f47fd2 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -490,7 +490,7 @@ int avio_read(AVIOContext *s, unsigned char *buf, int size)
return size1 - size;
}
-int ffio_read_indirect(AVIOContext *s, unsigned char *buf, int size, unsigned char **data)
+int ffio_read_indirect(AVIOContext *s, unsigned char *buf, int size, const unsigned char **data)
{
if (s->buf_end - s->buf_ptr >= size && !s->write_flag) {
*data = s->buf_ptr;