aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-30 20:05:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-09 22:02:15 +0200
commitcc0dd86580b3257f22a4981a79eb5fa6804182b6 (patch)
tree54dba1837b4d46026e19c39a69e6a1706c1a17d4
parent0baa0a5a02e16ef097ed9f72bc8a7d7b585c7652 (diff)
downloadffmpeg-cc0dd86580b3257f22a4981a79eb5fa6804182b6.tar.gz
avutil/log: Fix context pointer used for get_category()
Fixes calling a random pointer Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 7edb984dd051b6919d7d8471c70499273f31b0fa) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavutil/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 700e89fa97..49dd4d1897 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -178,7 +178,7 @@ static void format_line(void *ptr, int level, const char *fmt, va_list vl,
if (parent && *parent) {
snprintf(part[0], part_size, "[%s @ %p] ",
(*parent)->item_name(parent), parent);
- if(type) type[0] = get_category(((uint8_t *) ptr) + avc->parent_log_context_offset);
+ if(type) type[0] = get_category(parent);
}
}
snprintf(part[1], part_size, "[%s @ %p] ",