From 74bba649c3f3efd36b05f05b40d4346a501b213c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 21 Oct 2019 18:45:27 +0200 Subject: [PATCH] LibCore: Make CFile::open() assert that the filename is non-null --- Libraries/LibCore/CFile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibCore/CFile.cpp b/Libraries/LibCore/CFile.cpp index 38b5b75a0c..dfa5b2c073 100644 --- a/Libraries/LibCore/CFile.cpp +++ b/Libraries/LibCore/CFile.cpp @@ -26,6 +26,7 @@ bool CFile::open(int fd, CIODevice::OpenMode mode, ShouldCloseFileDescription sh bool CFile::open(CIODevice::OpenMode mode) { + ASSERT(!m_filename.is_null()); int flags = 0; if ((mode & CIODevice::ReadWrite) == CIODevice::ReadWrite) { flags |= O_RDWR | O_CREAT;