Removed a potential security hole on ReadX functions. The previus code allowed to read outside of ram buffer, potentially allowing to read private data or generate a fault