Alexander Motin 36289c3336 Add checks for received mode page length.
If our buffer is too small, we may receive part of the page, and should
not try read/write past the end of the buffer.

Reported by:	Coverity
CID:		1368374, 1368375
MFC after:	1 week
2017-01-10 20:52:44 +00:00
..
2015-06-13 19:20:56 +00:00
2016-04-19 11:12:57 +00:00