modules: using labs() for date math is unsafe
This commit is contained in:
parent
d2e0b78f6c
commit
3089f59c10
1 changed files with 1 additions and 1 deletions
|
@ -915,7 +915,7 @@ load_a_module(const char *path, int warn, int origin, int core)
|
||||||
*/
|
*/
|
||||||
if(mheader->mapi_datecode != datecode && mheader->mapi_datecode > 0)
|
if(mheader->mapi_datecode != datecode && mheader->mapi_datecode > 0)
|
||||||
{
|
{
|
||||||
long int delta = labs(datecode - mheader->mapi_datecode);
|
long int delta = datecode - mheader->mapi_datecode;
|
||||||
if (delta > MOD_WARN_DELTA)
|
if (delta > MOD_WARN_DELTA)
|
||||||
{
|
{
|
||||||
delta /= 86400;
|
delta /= 86400;
|
||||||
|
|
Loading…
Reference in a new issue