[NPFS_NEW]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 12 Sep 2013 00:16:42 +0000 (00:16 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Thu, 12 Sep 2013 00:16:42 +0000 (00:16 +0000)
Use _SEH2_YIELD when exiting from a _SEH2 block via a return or a goto (otherwise --> bug in the stack).
This limitation will be removed in SEH3, but it's not used at the moment.

svn path=/trunk/; revision=60052

reactos/drivers/filesystems/npfs_new/datasup.c
reactos/drivers/filesystems/npfs_new/fsctrl.c
reactos/drivers/filesystems/npfs_new/writesup.c

index 830be84..f4cad4d 100644 (file)
@@ -402,7 +402,7 @@ NpAddDataQueueEntry(IN ULONG NamedPipeEnd,
                 _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
                 {
                     NpFreeClientSecurityContext(ClientContext);
-                    return _SEH2_GetExceptionCode();
+                    _SEH2_YIELD(return _SEH2_GetExceptionCode());
                 }
                 _SEH2_END;
 
index 9abcc4f..63ad445 100644 (file)
@@ -336,7 +336,7 @@ NpTransceive(IN PDEVICE_OBJECT DeviceObject,
         }
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
         {
-            return _SEH2_GetExceptionCode();
+            _SEH2_YIELD(return _SEH2_GetExceptionCode());
         }
         _SEH2_END;
     }
@@ -427,7 +427,7 @@ NpTransceive(IN PDEVICE_OBJECT DeviceObject,
             _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
             {
                 Status = _SEH2_GetExceptionCode();
-                goto Quickie;
+                _SEH2_YIELD(goto Quickie);
             }
             _SEH2_END;
         }
index 29c3507..efe3f03 100644 (file)
@@ -97,7 +97,7 @@ NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
         {
             if (AllocatedBuffer) ExFreePool(Buffer);
-            return _SEH2_GetExceptionCode();
+            _SEH2_YIELD(return _SEH2_GetExceptionCode());
         }
         _SEH2_END;