Add some checks for bad inputs when opening files
Change-Id: I1cf9a3a0d5ca61c5e3bc375d28bd81a788a9fac5
diff --git a/src/os_linux.cc b/src/os_linux.cc
index ceda7dd..d3a1ccb 100644
--- a/src/os_linux.cc
+++ b/src/os_linux.cc
@@ -21,12 +21,14 @@
#include <sys/stat.h>
#include <fcntl.h>
+#include "base/logging.h"
#include "base/unix_file/fd_file.h"
#include "UniquePtr.h"
namespace art {
File* OS::OpenFile(const char* name, bool writable, bool create) {
+ CHECK(name != NULL);
int flags = 0;
if (writable) {
flags |= O_RDWR;