Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLSLCrossCompiler: Fix NULL pointer dereference on dcl_uav_structured #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DarkStarSword
Copy link

The following commit introduced a NULL pointer dereference that can
crash the HLSL cross compiler if it processes a shader that includes an
RWStructuredBuffer that has had its reflection information stripped:

commit 0659b1f3dfe3c2617c0b6d5b96d54017dcf9cae9
Author: James Jones <[email protected]>
Date:   Fri Jan 17 12:21:23 2014 +0000

    Fixes image_load_store and shader_storage_buffer_object features

This restores the if block to make the processing conditional on the
reflection information being found. This by itself may not be
immediately useful for the standalone HLSLCrossCompiler project that
does not expect to process stripped shaders, but it is necessary for
projects that use HLSLCrossCompiler as a library to decode shaders, such
as in 3DMigoto.

The following commit introduced a NULL pointer dereference that can
crash the HLSL cross compiler if it processes a shader that includes an
RWStructuredBuffer that has had its reflection information stripped:

    commit 0659b1f
    Author: James Jones <[email protected]>
    Date:   Fri Jan 17 12:21:23 2014 +0000

        Fixes image_load_store and shader_storage_buffer_object features

This restores the if block to make the processing conditional on the
reflection information being found. This by itself may not be
immediately useful for the standalone HLSLCrossCompiler project that
does not expect to process stripped shaders, but it is necessary for
projects that use HLSLCrossCompiler as a library to decode shaders, such
as in 3DMigoto.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant