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

ShadingModeExporter: Fix potential crash when exporting collection-based material bindings. #4106

Conversation

jufrantz
Copy link
Contributor

@jufrantz jufrantz commented Feb 6, 2025

This was caused by an out-of-range vector access.

…sed material bindings.

This was caused by an out-of-range vector access.
if (!boundPrimPaths.empty()) {
materialsToBind.push_back(mat);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the real fix. It ensures that materialsToBind and matAssignments sizes match, as expected later in the function.

@seando-adsk seando-adsk added the import-export Related to Import and/or Export label Feb 11, 2025
@seando-adsk seando-adsk assigned jufrantz and unassigned jufrantz Feb 21, 2025
@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Feb 21, 2025
@seando-adsk seando-adsk merged commit dc8857b into Autodesk:dev Feb 21, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants