Index: trunk/psModules/src/camera/pmFPABin.c
===================================================================
--- trunk/psModules/src/camera/pmFPABin.c	(revision 19709)
+++ trunk/psModules/src/camera/pmFPABin.c	(revision 19710)
@@ -31,10 +31,13 @@
     psImage *outImage = out->image = psImageRecycle(out->image,  numColsOut, numRowsOut, PS_TYPE_F32);
 
+    int xLast = numColsIn - 1, yLast = numRowsIn - 1; // Last index
     int yStart = psImageBinningGetFineY(binning, 0); // Starting input y for binning
     for (int yOut = 0; yOut < numRowsOut; yOut++) {
         int yStop = psImageBinningGetFineY(binning, yOut + 1); // Stopping input y for binning
+        yStop = PS_MIN(yStop, yLast);
         int xStart = psImageBinningGetFineX(binning, 0); // Starting input x for binning
         for (int xOut = 0; xOut < numColsOut; xOut++) {
             int xStop = psImageBinningGetFineX(binning, xOut + 1); // Stopping input x for binning
+            xStop = PS_MIN(xStop, xLast);
 
             float sum = 0.0;            // Sum of pixels
