Core/Authserver: Fixed invalid memory access when AsByteArray returns less bytes than expected