Logo
Explore Help
Register Sign In
griefith/test2
1
0
Fork 0
You've already forked test2
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
8fed30aff22a725eaf94de9645d041bf8093a53e
test2/intern/cycles/test/util_ies_test.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
292 B
C++
Raw Normal View History

Fix heap buffer overflow in Cycles IES parser The IES parser in Cycles would lead to heap buffer overflow error when non-supported or invalid data is provided to it. The error was caused by the way how stirng is copied to vector skipping the last null-terminator. Later C-style string utilities are used for parsing, and they expect the data to be null-terminated. It is unclear why data needs to be stored as vector: storing it as string simplifies initialization. Easiest to reproduce the issue is to use Blender build with address sanitizer enabled. Pull Request: https://projects.blender.org/blender/blender/pulls/116752
2024-01-03 18:00:41 +01:00
/* SPDX-FileCopyrightText: 2011-2024 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#include "testing/testing.h"
#include "util/ies.h"
CCL_NAMESPACE_BEGIN
TEST(util_ies, invalid)
{
IESFile ies_file;
EXPECT_FALSE(ies_file.load("Hello, World!"));
}
CCL_NAMESPACE_END
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 231ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API