Moving  'int ret" is beyond the scope of this bug fix (as I have been told before) so I stuck to fixing the problem at hand. It doesn't make sense to allocate stack space for "int e" if there is nothing to be read into it, hence my modification to move it within the "if (mb.remaining()>=sizeof(int)) {" block