xiph / opusfile

Stand-alone decoder library for .opus streams
BSD 3-Clause "New" or "Revised" License
161 stars 82 forks source link

A potential bug of NPD related to usage of libogg #37

Open ash1852 opened 2 years ago

ash1852 commented 2 years ago

Hi, I found a potential null pointer dereference bug in the project source code of opusfile related to usage of libogg, and I have shown the execution sequence of the program that may generate the bug on the graph below. The red text illustrates the steps that generate the bug, the red arrows represent the control flow. os_lacing_expand in short, the key step is not check the return value of call-statement relate to libogg. https://github.com/xiph/opusfile/blob/a46042a92cdf318496da0fa0d67a2d1c27ce15b5/src/opusfile.c#L2240-L2246 would you help to check if this bug is true?thank you for your patience and effort.