Giovanni Mascellani (@giomasce) commented about dlls/xactengine3_7/xact_dll.c:
TRACE("(%p)->(%p)\n", This, pNotificationDesc);
- if (pNotificationDesc->type == XACTNOTIFICATIONTYPE_WAVEBANKPREPARED)
This->wb_prepared_context = pNotificationDesc->pvContext;
- else if (pNotificationDesc->type == XACTNOTIFICATIONTYPE_WAVEBANKDESTROYED)
This->wb_destroyed_context = pNotificationDesc->pvContext;
- unwrap_notificationdesc(&fdesc, pNotificationDesc);
- This->contexts[pNotificationDesc->type - 1] = pNotificationDesc->pvContext;
This and similar accesses are undefined behavior when the caller requests an invalid notification type, and it doesn't seem we have any protection against that. What does happen on Windows when an invalid notification type is requested?