Minor corrections to NtCreateFile, NtQueryDirectory.

This commit is contained in:
gibbed
2014-01-20 06:08:24 -08:00
parent c673d55c1e
commit 6d7b25a338
2 changed files with 15 additions and 14 deletions

View File

@@ -211,7 +211,7 @@ public:
buffer = 0;
}
char* Duplicate() {
if (buffer == NULL) {
if (buffer == NULL || length == 0) {
return NULL;
}
auto copy = (char*)xe_calloc(length+1);