Index: trunk/psphot/src/psphotRadialProfileWings.c
===================================================================
--- trunk/psphot/src/psphotRadialProfileWings.c	(revision 33410)
+++ trunk/psphot/src/psphotRadialProfileWings.c	(revision 33411)
@@ -307,5 +307,11 @@
 	    // linearly interpolate to the radius at which we hit the sky, using the last flux and the limiting slope
 	    if (isfinite(lastFlux)) {
-		limitRadius = lastRadius + lastFlux / 3.0;
+                float interpolatedRadius = lastRadius + lastFlux / 3.0;
+                if (interpolatedRadius < MAX_RADIUS) {
+                    limitRadius = interpolatedRadius;
+                } else {
+                    // XXX should we keep going in this case?
+                    limitRadius = meanRadius;
+                }
 	    } else {
 		limitRadius = meanRadius;
