hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/video/fbdev/core/fbcon.c
....@@ -2513,9 +2513,12 @@
25132513 h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres))
25142514 return -EINVAL;
25152515
2516
+ if (font->width > 32 || font->height > 32)
2517
+ return -EINVAL;
2518
+
25162519 /* Make sure drawing engine can handle the font */
2517
- if (!(info->pixmap.blit_x & (1 << (font->width - 1))) ||
2518
- !(info->pixmap.blit_y & (1 << (font->height - 1))))
2520
+ if (!(info->pixmap.blit_x & BIT(font->width - 1)) ||
2521
+ !(info->pixmap.blit_y & BIT(font->height - 1)))
25192522 return -EINVAL;
25202523
25212524 /* Make sure driver can handle the font length */