-
Notifications
You must be signed in to change notification settings - Fork 593
Closed
Labels
Platform-XAMLBugs or features related to Xaml RendererBugs or features related to Xaml Renderer
Description
AdaptiveCards/source/uwp/AdaptiveCardsObjectModel/lib/ObjectModelUtil.cpp
Lines 313 to 317 in 61677f2
| case CardElementType::Unknown: | |
| default: | |
| return winrt::make<winrt::AdaptiveCards::ObjectModel::Uwp::implementation::AdaptiveUnsupportedElement>( | |
| std::AdaptivePointerCast<AdaptiveCards::UnknownElement>(baseElement)); | |
| } |
In the above, if we encounter an element that isn't covered in a case, but is a known element (shouldn't happen, but see #6393), we can end up incorrectly casting a known element to AdaptiveCards::UnknownElement, leading to undefined behavior later on. We should probably split the default case out on its own and throw an exception (and do a quick examination to see if this pattern is repeated elsewhere).
Metadata
Metadata
Assignees
Labels
Platform-XAMLBugs or features related to Xaml RendererBugs or features related to Xaml Renderer