Commit 5624b159 authored by Per Cederqvist's avatar Per Cederqvist

(garb_text): Avoid overflow when converting the garb-nice value from

days to seconds.  (Suspected by Anders Åke Carlsson.)
parent e4019c15
/*
* $Id: text-garb.c,v 0.34 1999/06/05 19:52:10 ceder Exp $
* $Id: text-garb.c,v 0.35 2000/03/13 11:51:12 ceder Exp $
* Copyright (C) 1991-1995, 1997-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -34,7 +34,7 @@
#endif
static const char *
rcsid = "$Id: text-garb.c,v 0.34 1999/06/05 19:52:10 ceder Exp $";
rcsid = "$Id: text-garb.c,v 0.35 2000/03/13 11:51:12 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -185,7 +185,7 @@ garb_text(void)
case recpt:
if ( cached_conf_exists( misc->datum.recipient ) )
{
limit = (24 * 3600 *
limit = (24 * 3600.0 *
cached_get_garb_nice( misc->datum.recipient ));
if ( age < limit )
{
......@@ -199,7 +199,7 @@ garb_text(void)
case cc_recpt:
if ( cached_conf_exists( misc->datum.cc_recipient ))
{
limit = ( 24 * 3600
limit = (24 * 3600.0
* cached_get_garb_nice( misc->datum.cc_recipient ));
if ( age < limit )
{
......@@ -213,7 +213,7 @@ garb_text(void)
case bcc_recpt:
if ( cached_conf_exists( misc->datum.bcc_recipient ))
{
limit = ( 24 * 3600
limit = (24 * 3600.0
* cached_get_garb_nice( misc->datum.bcc_recipient ));
if ( age < limit )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment