Skip to content

Commit 71139fb

Browse files
committed
Fix stack overflow in parsing full embedded pointers.
1 parent 223e183 commit 71139fb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

NtApiDotNet/Ndr/Marshal/NdrUnmarshalBuffer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,8 @@ public NdrEmbeddedPointer<T> ReadEmbeddedPointer<T>(Func<T> unmarshal_func, bool
746746

747747
if (full_pointer)
748748
{
749-
unmarshal_func = () => ReadFullPointer(referent, unmarshal_func);
749+
Func<T> original_unmarshal_func = unmarshal_func;
750+
unmarshal_func = () => ReadFullPointer(referent, original_unmarshal_func);
750751
}
751752

752753
var deferred_reader = NdrEmbeddedPointer<T>.CreateDeferredReader(unmarshal_func);

0 commit comments

Comments
 (0)