mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- use snprintf in condError.
While sprintf is generally problematic, it is particularly dangerous here where it is impossible to estimate the length of the messages.
This commit is contained in:
parent
9fad44bab2
commit
b23db149e3
1 changed files with 2 additions and 2 deletions
|
@ -3247,10 +3247,10 @@ void condError(XSPRITE* pXCond, const char* pzFormat, ...) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(buffer, "\n\n%s CONDITION RX: %d, TX: %d, SPRITE: #%d RETURNS:\n", condType.GetChars(), pXCond->rxID, pXCond->txID, pXCond->reference);
|
snprintf(buffer, 512, "\n\n%s CONDITION RX: %d, TX: %d, SPRITE: #%d RETURNS:\n", condType.GetChars(), pXCond->rxID, pXCond->txID, pXCond->reference);
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, pzFormat);
|
va_start(args, pzFormat);
|
||||||
vsprintf(buffer2, pzFormat, args);
|
vsnprintf(buffer2, 512, pzFormat, args);
|
||||||
I_Error("%s%s", buffer, buffer2);
|
I_Error("%s%s", buffer, buffer2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue