[PATCH] fix cid 1350010
Michael Adam
obnox at samba.org
Wed Feb 3 10:32:21 UTC 2016
Review/push appreciated.
Thanks - Michael
-------------- next part --------------
From ce60d79e6475b1c4189166bb1a54a2a2c87874f6 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Wed, 3 Feb 2016 11:28:32 +0100
Subject: [PATCH] lib:socket: fix CID 1350010 - integer OVERFLOW_BEFORE_WIDEN
Signed-off-by: Michael Adam <obnox at samba.org>
---
lib/socket/interfaces.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/socket/interfaces.c b/lib/socket/interfaces.c
index 98341e2..f0386c0 100644
--- a/lib/socket/interfaces.c
+++ b/lib/socket/interfaces.c
@@ -160,7 +160,7 @@ static void query_iface_speed_from_name(const char *name, uint64_t *speed)
if (ret == -1) {
goto done;
}
- *speed = (ethtool_cmd_speed(&ecmd)) * 1000 * 1000;
+ *speed = (uint64_t)(ethtool_cmd_speed(&ecmd)) * 1000 * 1000;
done:
(void)close(fd);
--
2.5.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160203/8e68e80d/signature.sig>
More information about the samba-technical
mailing list