about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2017-03-21 22:00:30 +0000
committerGitHub <noreply@github.com>2017-03-21 22:00:30 +0000
commit345c88c0d88daa6d5a3d12bd7c61d03e604f2d53 (patch)
tree7c1cbe59de8e546f7bae14aea325e293108f4265
parent2824a126cb32001bdfb0cf43ad90ba1e01c2f71f (diff)
parent73c5c452234fbd619028667b5f7a6f97741da764 (diff)
downloadklee-345c88c0d88daa6d5a3d12bd7c61d03e604f2d53.tar.gz
Merge pull request #617 from jirislaby/no-warn
runtime: change __get_sym_file to return NULL when path is NULL
-rw-r--r--runtime/POSIX/fd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/POSIX/fd.c b/runtime/POSIX/fd.c
index 24b248e3..6f78c747 100644
--- a/runtime/POSIX/fd.c
+++ b/runtime/POSIX/fd.c
@@ -37,6 +37,9 @@ int klee_get_errno(void);
 
 /* Returns pointer to the symbolic file structure fs the pathname is symbolic */
 static exe_disk_file_t *__get_sym_file(const char *pathname) {
+  if (!pathname)
+    return NULL;
+
   char c = pathname[0];
   unsigned i;