mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 04:23:13 +02:00
- Changed int_to_base64() warning so it has less false positives (#0001797).
This commit is contained in:
@@ -3120,3 +3120,4 @@ This is the 3.2 fixes branch.
|
||||
- Fixed a little problem in ./unreal to move ircd.pid.bak to ircd.pid of starting failed.
|
||||
Fixed by fez (#0001739)
|
||||
- Made it so chg* command usage is not logged from U:lines. Reported by diskman1 (#0001718)
|
||||
- Changed int_to_base64() warning so it has less false positives (#0001797).
|
||||
|
||||
@@ -232,13 +232,14 @@ static inline char *int_to_base64(long val)
|
||||
|
||||
base64buf[i] = '\0';
|
||||
|
||||
/* Temporary debugging code.. remove before 2038 ;p */
|
||||
if (val > 2147483646)
|
||||
/* Temporary debugging code.. remove before 2038 ;p.
|
||||
* This might happen in case of 64bit longs (opteron/ia64),
|
||||
* if the value is then too large it can easily lead to
|
||||
* a buffer underflow and thus to a crash. -- Syzop
|
||||
*/
|
||||
if (val > 2147483647L)
|
||||
{
|
||||
snprintf(trouble_info, sizeof(trouble_info),
|
||||
"[BUG] int_to_base64() called for insane value %ld. Please report!", val);
|
||||
ircd_log(LOG_ERROR, "%s", trouble_info);
|
||||
val = 2147483647L; /* prevent buffer overflow */
|
||||
abort();
|
||||
}
|
||||
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user