id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
1481,NG Swig Dataset ReadRaster() problems,warmerdam,warmerdam,"{{{
Reading rasters with Dataset.ReadRaster() with a multi-band band list 
results in a crash due to improperly computing buf_size (failing to
multiple by band count).

Index: Dataset.i
===================================================================
--- Dataset.i	(revision 10773)
+++ Dataset.i	(working copy)
@@ -90,9 +90,7 @@
                             int *buf_size, char **buf,
                             int band_list, int *pband_list )
 {
-
-    
-  *buf_size = buf_xsize * buf_ysize * GDALGetDataTypeSize( buf_type ) / 8;
+  *buf_size = buf_xsize * buf_ysize * (GDALGetDataTypeSize( buf_type ) / 8) * band_list;
   *buf = (char*) malloc( *buf_size );
 
   CPLErr result = GDALDatasetRasterIO(obj, GF_Read, xoff, yoff, xsize, ysize,
}}}",defect,closed,normal,1.4.1,PythonBindings,1.4.0,major,fixed,,
