mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
sprintf bad
svn path=/trunk/; revision=11114
This commit is contained in:
parent
79d6604660
commit
af06b2d654
1 changed files with 8 additions and 4 deletions
|
@ -204,9 +204,10 @@ DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags)
|
||||||
{
|
{
|
||||||
if (NT_CUSTOMER(ErrorCode))
|
if (NT_CUSTOMER(ErrorCode))
|
||||||
{
|
{
|
||||||
sprintf(TempBuf,
|
_snprintf(TempBuf, sizeof(TempBuf)-1,
|
||||||
"%%CUST-%s-",
|
"%%CUST-%s-",
|
||||||
SeverityCodes[NT_SEVERITY(ErrorCode)]);
|
SeverityCodes[NT_SEVERITY(ErrorCode)]);
|
||||||
|
TempBuf[sizeof(TempBuf)-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -219,14 +220,16 @@ DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags)
|
||||||
}
|
}
|
||||||
if (FacList[i].Name != NULL)
|
if (FacList[i].Name != NULL)
|
||||||
{
|
{
|
||||||
sprintf(TempBuf, "%%%s-%s-",
|
_snprintf(TempBuf, sizeof(TempBuf)-1, "%%%s-%s-",
|
||||||
FacList[i].Name,
|
FacList[i].Name,
|
||||||
SeverityCodes[NT_SEVERITY(ErrorCode)]);
|
SeverityCodes[NT_SEVERITY(ErrorCode)]);
|
||||||
|
TempBuf[sizeof(TempBuf)-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(TempBuf, "%%UNKNOWN-%s-",
|
_snprintf(TempBuf, sizeof(TempBuf)-1, "%%UNKNOWN-%s-",
|
||||||
SeverityCodes[NT_SEVERITY(ErrorCode)]);
|
SeverityCodes[NT_SEVERITY(ErrorCode)]);
|
||||||
|
TempBuf[sizeof(TempBuf)-1] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,7 +260,8 @@ DbgGetErrorText(NTSTATUS ErrorCode, PUNICODE_STRING ErrorText, ULONG Flags)
|
||||||
{
|
{
|
||||||
if (Flags & DBG_GET_SHOW_FACILITY)
|
if (Flags & DBG_GET_SHOW_FACILITY)
|
||||||
{
|
{
|
||||||
sprintf(NumBuf, "%08lx", ErrorCode);
|
_snprintf(NumBuf, sizeof(NumBuf)-1, "%08lx", ErrorCode);
|
||||||
|
NumBuf[sizeof(NumBuf)-1] = '\0';
|
||||||
strcat(TempBuf, NumBuf);
|
strcat(TempBuf, NumBuf);
|
||||||
strcat(TempBuf, " ");
|
strcat(TempBuf, " ");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue