mitigate a potential buffer overflow

Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>