Description

Due to a missing string in CompressionLevelNameMap in OodleDataCompression.cpp, it is possible for LevelName to be left uninitialised after parsing the compression effort, which causes a crash when that pointer is dereferenced.

TextureEditorToolkit.cpp:1373 looks up the Distribution packaging compression effort level. This value is then used to look up the name of the current distribution compression level on line 1382.

The maximum allowed value for Oodle is 9, which translates to Optimal5, under OodleLZ_CompressionLevel_Max. This is checked by the ECompressionLevelFromValue but not by ECompressionLevelToString.

Even if that check were implemented, LevelName would still be uninitialised as CompressionLevelNameMap and ECompressionLevel both lack an entry for Optimal5.

When 9 is selected as the effort level for distribution, the index isn't found within the CompressionLevelNameMap and LevelName is left uninitialised. The Oodle tab in the Texture Editor is then created starting at line TextureEditorToolkit.cpp:1409, which results in the dereference of the uninitialised LevelName on line 1790.

Steps to Reproduce

In a project, in DefaultGame.ini under [/Script/UnrealEd.ProjectPackagingSettings], set the following:
PackageCompressionLevel_Distribution=9
BuildConfiguration=PPBC_Shipping
ForDistribution=True

Attempting to open a texture editor window in this configuration should crash the editor.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-220836 in the post.

0
Login to Vote

Fixed
ComponentRAD - Oodle
Affects Versions5.4.35.3.25.5
Target Fix5.5
Fix Commit35410725
CreatedAug 2, 2024
ResolvedAug 8, 2024
UpdatedAug 14, 2024
View Jira Issue