XX-11179:  Correcting possible illegal memory access uncovered by Coverity Scan