Skip to content

Commit cc6a2d5

Browse files
committed
Fix sizes of internal structs in SMB/NFS network filesystems
1 parent fb84bf9 commit cc6a2d5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/fs/fs_nfs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ NfsFs::NfsFs(Context &context, std::string_view name, std::string_view mount_nam
6161
this->devoptab = {
6262
.name = this->name.data(),
6363

64-
.structSize = sizeof(NfsFs),
64+
.structSize = sizeof(NfsFsFile),
6565
.open_r = NfsFs::nfs_open,
6666
.close_r = NfsFs::nfs_close,
6767
.read_r = NfsFs::nfs_read,
@@ -71,7 +71,7 @@ NfsFs::NfsFs(Context &context, std::string_view name, std::string_view mount_nam
7171
.stat_r = NfsFs::nfs_stat,
7272
.chdir_r = NfsFs::nfs_chdir,
7373

74-
.dirStateSize = sizeof(NfsFs),
74+
.dirStateSize = sizeof(NfsFsDir),
7575
.diropen_r = NfsFs::nfs_diropen,
7676
.dirreset_r = NfsFs::nfs_dirreset,
7777
.dirnext_r = NfsFs::nfs_dirnext,

src/fs/fs_smb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ SmbFs::SmbFs(Context &context, std::string_view name, std::string_view mount_nam
7070
this->devoptab = {
7171
.name = this->name.data(),
7272

73-
.structSize = sizeof(SmbFs),
73+
.structSize = sizeof(SmbFsFile),
7474
.open_r = SmbFs::smb_open,
7575
.close_r = SmbFs::smb_close,
7676
.read_r = SmbFs::smb_read,
@@ -80,7 +80,7 @@ SmbFs::SmbFs(Context &context, std::string_view name, std::string_view mount_nam
8080
.stat_r = SmbFs::smb_stat,
8181
.chdir_r = SmbFs::smb_chdir,
8282

83-
.dirStateSize = sizeof(SmbFs),
83+
.dirStateSize = sizeof(SmbFsDir),
8484
.diropen_r = SmbFs::smb_diropen,
8585
.dirreset_r = SmbFs::smb_dirreset,
8686
.dirnext_r = SmbFs::smb_dirnext,

0 commit comments

Comments
 (0)