r3353: don't reference dos.attrib unless its initialised
authorAndrew Tridgell <tridge@samba.org>
Fri, 29 Oct 2004 05:58:22 +0000 (05:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:00 +0000 (13:05 -0500)
source/ntvfs/posix/pvfs_resolve.c

index be1662437e0c9acaae7645d3ff4cce5828ddfcaa..672d028dd5b4e53699c45d94d24a8682878146d6 100644 (file)
@@ -510,7 +510,7 @@ NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd,
                inode = name->st.st_ino;
        }
 
-       if (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) {
+       if (name->exists && (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) {
                if (stat(name->full_name, &name->st) == -1) {
                        return NT_STATUS_INVALID_HANDLE;
                }