summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/fs/ntapi_tt_istat.c4
-rw-r--r--src/fs/ntapi_tt_stat.c4
-rw-r--r--src/fs/ntapi_tt_statfs.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/fs/ntapi_tt_istat.c b/src/fs/ntapi_tt_istat.c
index f17c8b1..67545a0 100644
--- a/src/fs/ntapi_tt_istat.c
+++ b/src/fs/ntapi_tt_istat.c
@@ -39,6 +39,10 @@ int32_t __stdcall __ntapi_tt_istat(
istat->hfile = hfile;
istat->dev_name_maxlen = (uint16_t)infolen - sizeof(*istat);
+ /* sigh */
+ if (buffer_size >= 65536)
+ buffer_size = 65535;
+
/* file index number */
if (!(flags & NT_ISTAT_DEV_NAME_ONLY))
if ((status = __ntapi->zw_query_information_file(
diff --git a/src/fs/ntapi_tt_stat.c b/src/fs/ntapi_tt_stat.c
index 762535f..4d40fba 100644
--- a/src/fs/ntapi_tt_stat.c
+++ b/src/fs/ntapi_tt_stat.c
@@ -39,6 +39,10 @@ int32_t __stdcall __ntapi_tt_stat(
stat->hfile = hfile;
stat->dev_name_maxlen = (uint16_t)infolen - sizeof(*stat);
+ /* sigh */
+ if (buffer_size >= 65536)
+ buffer_size = 65535;
+
/* system-unique device name */
if ((status = __ntapi->zw_query_information_file(
hfile,
diff --git a/src/fs/ntapi_tt_statfs.c b/src/fs/ntapi_tt_statfs.c
index d131758..5d5de60 100644
--- a/src/fs/ntapi_tt_statfs.c
+++ b/src/fs/ntapi_tt_statfs.c
@@ -44,6 +44,10 @@ int32_t __stdcall __ntapi_tt_statfs(
statfs->hfile = hfile;
statfs->dev_name_maxlen = (uint16_t)infolen - sizeof(*statfs);
+ /* sigh */
+ if (buffer_size >= 65536)
+ buffer_size = 65535;
+
/* maximum component length, file system type */
if ((status = __ntapi->zw_query_volume_information_file(
hfile,