Closed stripes416 closed 7 years ago
I am only able to reproduce with HEVC 10 bit and VP9 10 bit streams. I could not reproduce with other codecs.
m_file is an invalid pointer.... looks like someone forgot to initialize it to NULL.
C++'s std::ofstream would be better for file operations instead of raw C-style FILE* constructs.
Thanks @stripes416 for rising up this issue that I make. I am sorry for that. Thanks @uartie to fix this.
Hi @wudping , do we have a regression test for -2?
Yes, @xuguangxin, we have. I have double-checked it on my end. But @uartie help to fix this bug with the pull request #98.
@xuguangxin and @wudping ... The commit mentioned in the description above did not actually introduce this bug... this bug has always been there. It was only coincidence that this patch changed memory layout enough in a way that exposed the problem. Any commit would have inevitably exposed this at some point. It's a surprise that the bug never surfaced until now.
Furthermore, uninitialized class member variables get arbitrary values... we've only been lucky until now that the arbitrary value was 0 (NULL) previously.
it's little wired, static scan tool should report issues if we use a uninitialised memory. But it does not report it...
Since the following commit in libyami decode, MD5 output mode (-m -2) segfaults (see stack trace below).