mapbox/rasterio — pull request #214 by snorfalorpagus (2014-12-06 15:02:46+00:00)
Title: Prevent segfault caused by reading invalid raster window.

Previously the following code would cause a segmentation fault:

```
import rasterio
filename = '/Users/snorf/Downloads/rasterio/tests/data/RGB.byte.tif'
with rasterio.open(filename, 'r') as src:
data = src.read(1, window=((0, src.height+1), (0, 1)))
```

The code attempts to read data from a raster outside of the raster extent. This commit adds some code to `eval_window` to catch this before it happens and raise a `ValueError` instead.