From 45a52467063fd0623d8c34c0db7ff1abcbdb99a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 14 Oct 2013 22:57:25 +0200 Subject: [PATCH] cdda: Fixed crash on allocation failure. * Thanks korli! --- src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp index 158b8c511a..d6f19163cc 100644 --- a/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/cdda/kernel_interface.cpp @@ -433,6 +433,9 @@ read_attributes(int fd, Inode* inode) name[length] = '\0'; Attribute* attribute = new(std::nothrow) Attribute(name, type); + if (attribute == NULL) + return false; + if (attribute->IsProtectedNamespace()) { // Attributes in the protected namespace are handled internally // so we do not load them even if they are present in the