DragonFlyBSD Kernel Audit
DF-0481 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/net/bridge/bridgestp.c b/sys/net/bridge/bridgestp.c
--- a/sys/net/bridge/bridgestp.c
+++ b/sys/net/bridge/bridgestp.c
@@ -510,7 +510,7 @@
 		 * NOTE: The designated_cost temporary variable already added
 		 *	 in the path code of the related root port.
 		 */
-		if (bif->bif_peer_cost + bif->bif_path_cost > designated_cost)
+		if ((uint64_t)bif->bif_peer_cost + bif->bif_path_cost > (uint64_t)designated_cost)
 			continue;
 		if (bif->bif_peer_cost + bif->bif_path_cost < designated_cost)
 			goto set_port;