forked from xt-sys/exectos
Fix NULL pointer
This commit is contained in:
parent
00cca9a1c1
commit
109fd094ea
@ -958,7 +958,7 @@ RtlpFormatWideStringArgumentSpecifier(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
GuidArg = VA_ARG(*ArgumentList, PGUID);
|
GuidArg = VA_ARG(*ArgumentList, PGUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure GUID is not NULL */
|
/* Make sure a pointer to GUID is not NULL */
|
||||||
if(GuidArg != NULL)
|
if(GuidArg != NULL)
|
||||||
{
|
{
|
||||||
/* Write formatted GUID string */
|
/* Write formatted GUID string */
|
||||||
@ -1143,9 +1143,13 @@ RtlpFormatWideStringArgumentSpecifier(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
AnsiStrArg = VA_ARG(*ArgumentList, PANSI_STRING);
|
AnsiStrArg = VA_ARG(*ArgumentList, PANSI_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure a pointer to ANSI_STRING is not NULL */
|
||||||
|
if(AnsiStrArg != NULL)
|
||||||
|
{
|
||||||
/* Write formatted ANSI string value */
|
/* Write formatted ANSI string value */
|
||||||
Status = RtlpWriteWideStringStringValue(Context, &FormatProperties, AnsiStrArg->Buffer, AnsiStrArg->Length);
|
Status = RtlpWriteWideStringStringValue(Context, &FormatProperties, AnsiStrArg->Buffer, AnsiStrArg->Length);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(FormatProperties.VariableType == UnicodeString)
|
else if(FormatProperties.VariableType == UnicodeString)
|
||||||
{
|
{
|
||||||
/* Unicode string type */
|
/* Unicode string type */
|
||||||
@ -1161,9 +1165,13 @@ RtlpFormatWideStringArgumentSpecifier(IN PRTL_PRINT_CONTEXT Context,
|
|||||||
UnicodeStrArg = VA_ARG(*ArgumentList, PUNICODE_STRING);
|
UnicodeStrArg = VA_ARG(*ArgumentList, PUNICODE_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure a pointer to UNICODE_STRING is not NULL */
|
||||||
|
if(UnicodeStrArg != NULL)
|
||||||
|
{
|
||||||
/* Write formatted UNICODE string value */
|
/* Write formatted UNICODE string value */
|
||||||
Status = RtlpWriteWideStringValue(Context, &FormatProperties, UnicodeStrArg->Buffer, UnicodeStrArg->Length);
|
Status = RtlpWriteWideStringValue(Context, &FormatProperties, UnicodeStrArg->Buffer, UnicodeStrArg->Length);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Cleanup ArgumentsCopy object */
|
/* Cleanup ArgumentsCopy object */
|
||||||
VA_END(ArgumentsCopy);
|
VA_END(ArgumentsCopy);
|
||||||
|
Loading…
Reference in New Issue
Block a user