From 8f762b7c781c35e5b45842b3b23169681f867793 Mon Sep 17 00:00:00 2001 From: David Korth Date: Mon, 9 Jun 2025 18:30:01 -0400 Subject: [PATCH] ICOPrivate::ICOPrivate(): Return if the type is unrecognized. Otherwise, dir.res will be allocated, with unpredictable results. --- src/librptexture/fileformat/ICO.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librptexture/fileformat/ICO.cpp b/src/librptexture/fileformat/ICO.cpp index 19acb2cb2..c9135a453 100644 --- a/src/librptexture/fileformat/ICO.cpp +++ b/src/librptexture/fileformat/ICO.cpp @@ -273,6 +273,7 @@ ICOPrivate::ICOPrivate(ICO *q, const IResourceReaderPtr &resReader, uint16_t typ } else { // Unrecognized? dir.v = nullptr; + return; } // Initialize the icon directory union.