OpenHEVC / openHEVC

HEVC decoder
http://openhevc.github.io/openHEVC/
532 stars 193 forks source link

For some bitstream, get_cabac_bypass() will read 2 extra bytes #50

Open hxz1986 opened 8 years ago

hxz1986 commented 8 years ago

And it will crash for memory out of bound error. Is it a known issue?

Thanks!!

pcabarat commented 8 years ago

Hi. We didn't know about this issue. Can you provide us with a bitstream so we can reproduce the issue? Which branch did you use?

Pierre-Loup

hxz1986 commented 8 years ago

Hi Pierre-Loup,

Thanks for your quick response. I attached the bitstream. It seems the cabac decoder of openhevc will read 2 bytes ahead. In some cases, it will read memory out of bound.

Xiaozheng

BR, Xiaozheng Huang

2016-10-18 18:59 GMT+08:00 Pierre-Loup Cabarat notifications@github.com:

Hi. We didn't know about this issue. Can you provide us with a bitstream so we can reproduce the issue? What branch did you use?

Pierre-Loup

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenHEVC/openHEVC/issues/50#issuecomment-254474670, or mute the thread https://github.com/notifications/unsubscribe-auth/AV2DI1fyvaCRb8-B5dXEqGx8zZ37GqTTks5q1KaSgaJpZM4KZcbu .

hxz1986 commented 8 years ago

The latest openhevc can still reproduce this issue.

BR, Xiaozheng Huang

2016-10-19 10:26 GMT+08:00 Huang Xiaozheng huangxiaozheng1986@gmail.com:

Hi Pierre-Loup,

Thanks for your quick response. I attached the bitstream. It seems the cabac decoder of openhevc will read 2 bytes ahead. In some cases, it will read memory out of bound.

Xiaozheng

BR, Xiaozheng Huang

2016-10-18 18:59 GMT+08:00 Pierre-Loup Cabarat notifications@github.com:

Hi. We didn't know about this issue. Can you provide us with a bitstream so we can reproduce the issue? What branch did you use?

Pierre-Loup

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenHEVC/openHEVC/issues/50#issuecomment-254474670, or mute the thread https://github.com/notifications/unsubscribe-auth/AV2DI1fyvaCRb8-B5dXEqGx8zZ37GqTTks5q1KaSgaJpZM4KZcbu .

hxz1986 commented 8 years ago

It seems email attachment does not work. I attached a problematic bitstream here. Please remove ".txt". 2bytes.265.txt

hxz1986 commented 8 years ago

To repro this issue, you must allocate the exact number of bytes as the the bitstream size and use app verifier to help repro this crash.

pcabarat commented 8 years ago

It plays well on Rext and HEVC_extensions on my computer. I'll need more explanations: What do you mean by allocate the exact number of bytes as the bitstream? How do you use the decoder? When does it crash? (end of decoding) Does it works on other streams ?