coverity#1224983 out of bound

Change-Id: I58cf35e8729110f2488bf08d6cadc1ec428298cf
coverity#1224982 out of bound

Change-Id: Ibf5e6475b3bbfbb25e0204e3999674e59555eddf
coverity#1224978 integer overflow

Change-Id: Ie7dd90e6e395fb84802758e7d90ffac010dcced0
coverity#1224977 integer overflow

Change-Id: Ic212489319ef06486323877227bc8f43cc9190cc
coverity#1224984 Dereference before check

Change-Id: I93c8326d204d1b15a2a7ac5288a6c767029c6501
coverity#982762 Dereference NULL

Change-Id: I9da66fe9cf279231d6024f23fbb273797b289ba7
cosmetic 'en-passant'....

Change-Id: I9a787065898004ece4bd55839c563b7395e3a314