- mm_log((1,"i_conv(im %p, coeff %p, len %d)\n",im,coeff,len));
- i_clear_error();
+ im_log((aIMCTX,1,"i_conv(im %p, coeff %p, len %d)\n",im,coeff,len));
+ im_clear_error(aIMCTX);
+
+ if (len < 1) {
+ im_push_error(aIMCTX, 0, "there must be at least one coefficient");
+ return 0;
+ }