Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Cast to u_int64_t when computing callout argument...



details:   https://anonhg.NetBSD.org/src/rev/5ffa5a06c7ab
branches:  trunk
changeset: 507627:5ffa5a06c7ab
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Mar 27 17:24:03 2001 +0000

description:
Cast to u_int64_t when computing callout argument, to avoid int overflow.
Fixes kern/12471.

diffstat:

 sys/dev/ic/adv.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 567d73e70a64 -r 5ffa5a06c7ab sys/dev/ic/adv.c
--- a/sys/dev/ic/adv.c  Tue Mar 27 10:34:05 2001 +0000
+++ b/sys/dev/ic/adv.c  Tue Mar 27 17:24:03 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adv.c,v 1.22 2001/03/08 06:49:49 thorpej Exp $ */
+/*     $NetBSD: adv.c,v 1.23 2001/03/27 17:24:03 bouyer Exp $  */
 
 /*
  * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers
@@ -375,7 +375,7 @@
 
                if ((ccb->xs->xs_control & XS_CTL_POLL) == 0)
                        callout_reset(&ccb->xs->xs_callout,
-                           (ccb->timeout * hz) / 1000,
+                           ((u_int64_t)ccb->timeout * (u_int64_t)hz) / 1000,
                            adv_timeout, ccb);
        }
 }



Home | Main Index | Thread Index | Old Index