From 59fb70c9dbde86edf4d7406a645db0dbb66e0c07 Mon Sep 17 00:00:00 2001 From: Sathyanarayanan Gunasekaran Date: Tue, 17 Jun 2014 00:04:45 -0700 Subject: don't open files with empty path --- src/library_fs.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/library_fs.js') diff --git a/src/library_fs.js b/src/library_fs.js index d825892c..a75dab97 100644 --- a/src/library_fs.js +++ b/src/library_fs.js @@ -932,6 +932,9 @@ mergeInto(LibraryManager.library, { }); }, open: function(path, flags, mode, fd_start, fd_end) { + if (path === "") { + throw new FS.ErrnoError(ERRNO_CODES.ENOENT); + } flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; if ((flags & {{{ cDefine('O_CREAT') }}})) { -- cgit v1.2.3-18-g5258