[widevine] Fix bad data pointer on clrb_out variable #1464
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Premise, i havent understood the data target format of
dataOut
this prevents me from understanding how the data should be composed/constructed in to dataOut
from my investigations i found that:
dataOut.UseData() was used to get and store current data pointer but after that, many times is used "AppendData",
this method before append data check if the internal buffer of AP4_DataBuffer is enough to store data if not re-create the internal buffer, and so the data pointer before stored (to
clrb_out
) will point to a bad memory address causing the segmentation fault crashNOTE: the crash affect most of times aarch64/ARM64 cpu's, other systems looks like problem remains hidden maybe due to system optimization the "old" memory address still working
Motivation and context
fix #1394
fix #1452
How has this been tested?
Tested am@zon VOD videos episodes on:
CoreElec with aarch64 cpu
Android nvidia shield pro
Windows
Screenshots (if appropriate):
Types of change
Checklist: