Fix crash of xrdp-chansrv process, issue #1202.
In xfuse_create_file_in_xrdp_fs insure that xfuse_fs is properly initialized.
This commit is contained in:
parent
6049cf8dad
commit
ba93badf73
@ -1228,10 +1228,17 @@ xfuse_create_file_in_xrdp_fs(tui32 device_id, int pinode, const char *name,
|
||||
{
|
||||
XRDP_INODE *xinode;
|
||||
XRDP_INODE *xinodep;
|
||||
time_t cur_time;
|
||||
|
||||
if ((name == NULL) || (strlen(name) == 0))
|
||||
return NULL;
|
||||
|
||||
/* Do we have an inode table yet? */
|
||||
if (xfuse_init_xrdp_fs())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xinode = g_new0(XRDP_INODE, 1);
|
||||
if (xinode == NULL)
|
||||
{
|
||||
@ -1239,6 +1246,8 @@ xfuse_create_file_in_xrdp_fs(tui32 device_id, int pinode, const char *name,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cur_time = time(0);
|
||||
|
||||
xinode->parent_inode = pinode;
|
||||
xinode->inode = g_xrdp_fs.next_node++;
|
||||
xinode->nlink = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user