diff --git a/lib/interpolate.c b/lib/interpolate.c index a453a05..a9c009b 100644 --- a/lib/interpolate.c +++ b/lib/interpolate.c @@ -49,6 +49,14 @@ fprintf(stderr, ">>> %s ( %p %p %p %f )\n", __func__, s1, s2, d, coef); #endif +/* sanity check here ? or may be ask the + caller to do it himself ? +*/ +if ( (coef < 0.0) || (coef >= 1.0) ){ + fprintf(stderr, "%s: coef %f out of range\n", __func__, coef); + return -8; + } + foo = fimg_images_not_compatible(s1, s2); if (foo) { fprintf(stderr, "compat s1 s2 -> %d\n", foo);