From: Harley Armstrong <hjarm...@uwaterloo.ca> Fix CID 1343302 by widening a constant used with uart_param.reg_shift to avoid overflow for large values of reg_shift.
Signed-off-by: Harley Armstrong <hjarm...@uwaterloo.ca> --- xen/drivers/char/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index bc24015..546bba1 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -913,7 +913,7 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_amt, unsigned int bar_idx) * Force length of mmio region to be at least * 8 bytes times (1 << reg_shift) */ - if ( size < (0x8 * (1 << uart_param[p].reg_shift)) ) + if ( size < (0x8 * (1ull << uart_param[p].reg_shift)) ) continue; if ( bar_idx >= uart_param[p].max_bars ) -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel