Author: pschweitzer
Date: Sun Apr 7 11:35:50 2013
New Revision: 58711
URL:
http://svn.reactos.org/svn/reactos?rev=58711&view=rev
Log:
[KS]
Check parameters before using them and not after
Modified:
trunk/reactos/drivers/ksfilter/ks/event.c
Modified: trunk/reactos/drivers/ksfilter/ks/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/event.…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/event.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/event.c [iso-8859-1] Sun Apr 7 11:35:50 2013
@@ -421,17 +421,17 @@
PKSEVENT_ENTRY EventEntry;
PLIST_ENTRY Entry;
+ if (!Ctx || !Ctx->List || !Ctx->FileObject || !Ctx->Irp)
+ {
+ /* invalid parameter */
+ return FALSE;
+ }
+
/* get current irp stack location */
IoStack = IoGetCurrentIrpStackLocation(Ctx->Irp);
/* get event data */
EventData = (PKSEVENTDATA)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
-
- if (!Ctx || !Ctx->List || !Ctx->FileObject || !Ctx->Irp)
- {
- /* invalid parameter */
- return FALSE;
- }
/* point to first entry */
Entry = Ctx->List->Flink;