Author: sginsberg
Date: Thu Sep 11 09:24:41 2008
New Revision: 36136
URL:
http://svn.reactos.org/svn/reactos?rev=36136&view=rev
Log:
- NtQueryInformationProcess with ProcessImageFileName query type:
Free the buffer allocated by SeLocateProcessImageName, and set return status if return
buffer is too small (so caller will know to allocate more memory). Spotted by #3714
See issue #3714 for more details.
Modified:
trunk/reactos/ntoskrnl/ps/query.c
Modified: trunk/reactos/ntoskrnl/ps/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=36…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Thu Sep 11 09:24:41 2008
@@ -426,6 +426,14 @@
}
_SEH_END;
}
+ else
+ {
+ /* Buffer too small */
+ Status = STATUS_INFO_LENGTH_MISMATCH;
+ }
+
+ /* Free the image path */
+ ExFreePool(ImageName);
}
break;