Make inputResource() find the buffer length when set to false