CA-130011:Prevent xapi from filling it's buffer and running out of memory while reading from an invalid device file

Signed-off-by: Akshay <akshay.ramani@citrix.com>
Merge pull request #1707 from johnelse/ca-130011-xs64bit

CA-130011:Prevent xapi from filling it's buffer and running out of memory while reading from an invalid device file