Skip to content

Commit 734a043

Browse files
hpoussinHBelusca
authored andcommitted
[NTOS:EX] Implement NtSystemDebugControl: SysDbgGetPrintBufferSize
1 parent 4dc0e5c commit 734a043

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ntoskrnl/ex/dbgctrl.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,18 @@ NtSystemDebugControl(
319319
break;
320320

321321
case SysDbgGetPrintBufferSize:
322+
if (OutputBufferLength != sizeof(ULONG))
323+
{
324+
Status = STATUS_INFO_LENGTH_MISMATCH;
325+
}
326+
else
327+
{
328+
/* Return buffer size only if KD is enabled */
329+
*(PULONG)OutputBuffer = KdPitchDebugger ? 0 : KdPrintBufferSize;
330+
Status = STATUS_SUCCESS;
331+
}
332+
break;
333+
322334
case SysDbgSetPrintBufferSize:
323335
case SysDbgGetKdUmExceptionEnable:
324336
case SysDbgSetKdUmExceptionEnable:

0 commit comments

Comments
 (0)