Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 4b44de571c95ea7b51b1b0452ce986e85339fe74)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 28ca043f03a30a495ef7a410a939236ea59874bf)
@@ -191,4 +191,10 @@
 
 		if (res->type == IO_RANGE) {
+			if (res->res.io_range.size < REG_COUNT) {
+				ddf_msg(LVL_ERROR, "I/O range assigned to \
+				    device %s is too small", rtc->dev->name);
+				rc = ELIMIT;
+				goto error;
+			}
 			rtc->io_addr = res->res.io_range.address;
 			ioport = true;
