diff options
Diffstat (limited to 'src/fs/ntapi_tt_istat.c')
-rw-r--r-- | src/fs/ntapi_tt_istat.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/fs/ntapi_tt_istat.c b/src/fs/ntapi_tt_istat.c index 25d098c..99e0a1d 100644 --- a/src/fs/ntapi_tt_istat.c +++ b/src/fs/ntapi_tt_istat.c @@ -137,20 +137,16 @@ int32_t __stdcall __ntapi_tt_istat( wch_mark, (uintptr_t)wch - (uintptr_t)wch_mark); - if (!(flags & NT_ISTAT_DEV_NAME_COPY)) { - istat->dev_name[0] = 0; + if (!(flags & NT_ISTAT_DEV_NAME_COPY)) return NT_STATUS_SUCCESS; - } else if (istat->dev_name_maxlen < sdev->strlen) { - istat->dev_name[0] = 0; + else if (istat->dev_name_maxlen < istat->dev_name_strlen) return NT_STATUS_BUFFER_TOO_SMALL; - } __ntapi->tt_memcpy_utf16( istat->dev_name, sdev->buffer, istat->dev_name_strlen); - return status; } |