Commit 7edb984d authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 53efb2fa
......@@ -180,7 +180,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] ",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment