From 85b39215b7264022460d3895e755e337485807b8 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 30 Jan 2017 04:42:45 +0000 Subject: {i}stat{fs} interfaces(): hold the operating system's hand as needed. --- src/fs/ntapi_tt_stat.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fs/ntapi_tt_stat.c') 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, -- cgit v1.2.3