No longer crash 64 bit Adobe Acrobat / Reader when rendering a virtualBuffer for PDF content#13852
Conversation
…nglong on 64 bit and long on 32 bit, therefore use a LONG_PTR to fetch the put param and static cast it to long on return. Internally, Acrobat only deals with 32 bit accIDs so will never overflow. But this change is necessary otherwise windows COM will try writing past the end of the out param, causing a crash.
|
Although this requires an Acrobat / Reader with fixes to fully avoid the crash, this can still be merged to master safely. It however will not make the crash better until the fixes is available on the adobe side also. |
|
@michaelDCurran wrote:
But @seanbudd put the "blocked/needs-external-fix" label. If an early (immediate) merge of this PR is done, this would allow to have the issue fixed as ssoon as Adobe releases a fix for it. On the contrary, if Adobe's fix is expected to merge this PR, the issue will be fixed only when the next NVDA release is available, what takes more time. Can the reason of the "blocked/needs-external-fix" label be clarified or checked? Thanks. |
|
@CyrilleB79 - it is safe to merge, but without an Adobe build to test with, there is no way to be certain that the issue is fixed. |
|
Adobe has already released a bug fix. Please check for updates in your product. I tested it and this pull request works as expected. See the release notes here. |
|
@OzancanKaratas I have no trouble using that build of Adobe Reader with NVDA 2022.2beta2, |
|
@OzancanKaratas - do you have the same experience as me? |
|
I can still reproduce this. Test environment:
|
|
Thanks @k-kolev1985: does this PR build fix the issue? |
|
Yes, it does. |
|
@seanbudd, I approved the build in this pull request as it fixed the issue. But if I don't use the build here, I still reproduce the problem. |
Co-authored-by: Reef Turner <feerrenrut@users.noreply.github.com>
Link to issue number:
Fixes #12920
Summary of the issue:
Adobe Acrobat / Reader 64 bit crashes when NVDA renders a virtualBuffer for PDF content.
There are two reasons for this:
Adobe has addressed point 2 in Adobe Acrobat / Reader beta versions and will be in a stable build in the near future.
But NVDA needs to address point 1 in its own code.
Description of user facing changes
Using a version of Adobe Acrobat / Reader with the required fixes on adobe's side, along with this PR in NVDA, the crash is avoided.
Description of development approach
miscDeps has been updated to contain the newest version of acrobatAccess.idl from the Adobe Acrobat SDK.
The adobeAcrobat vbufBackend getAccID method has been changed to fetch the out param of IAccID::get_accID with a LONG_PRT which will be 64 bit wide on 64 bit Acrobat / Reader, and 32 bit wide on 32 bit Acrobat / Reader. The value is then static casted to long when returned. As Acrobat always uses 32 bit accID vlaues, no information will be lost in the conversion.
Testing strategy:
Opened multiple pdf documents in Adobe Acrobat / Reader while running NVDA. Ensured that Acrobat / Reader did not crash and that the pdf could be read with the arrow keys.
Known issues with pull request:
None known.
Change log entries:
New features
Changes
Bug fixes
For Developers
Code Review Checklist: