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. * Copyright (C) 1991-1995, 1997-1999 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#endif #endif
static const char * 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" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -185,7 +185,7 @@ garb_text(void) ...@@ -185,7 +185,7 @@ garb_text(void)
case recpt: case recpt:
if ( cached_conf_exists( misc->datum.recipient ) ) if ( cached_conf_exists( misc->datum.recipient ) )
{ {
limit = (24 * 3600 * limit = (24 * 3600.0 *
cached_get_garb_nice( misc->datum.recipient )); cached_get_garb_nice( misc->datum.recipient ));
if ( age < limit ) if ( age < limit )
{ {
...@@ -199,7 +199,7 @@ garb_text(void) ...@@ -199,7 +199,7 @@ garb_text(void)
case cc_recpt: case cc_recpt:
if ( cached_conf_exists( misc->datum.cc_recipient )) if ( cached_conf_exists( misc->datum.cc_recipient ))
{ {
limit = ( 24 * 3600 limit = (24 * 3600.0
* cached_get_garb_nice( misc->datum.cc_recipient )); * cached_get_garb_nice( misc->datum.cc_recipient ));
if ( age < limit ) if ( age < limit )
{ {
...@@ -213,7 +213,7 @@ garb_text(void) ...@@ -213,7 +213,7 @@ garb_text(void)
case bcc_recpt: case bcc_recpt:
if ( cached_conf_exists( misc->datum.bcc_recipient )) if ( cached_conf_exists( misc->datum.bcc_recipient ))
{ {
limit = ( 24 * 3600 limit = (24 * 3600.0
* cached_get_garb_nice( misc->datum.bcc_recipient )); * cached_get_garb_nice( misc->datum.bcc_recipient ));
if ( age < limit ) 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