Index: pstk_compat.c =================================================================== --- pstk_compat.c (revision 15076) +++ pstk_compat.c (revision 15077) @@ -123,6 +123,8 @@ assert(pad_dia > drill_dia); assert(drill_dia > 0); + assert(clearance >= 0); + assert(mask >= 0); memset(&proto, 0, sizeof(proto)); memset(&tshp, 0, sizeof(tshp)); @@ -443,6 +445,10 @@ int n; pcb_coord_t cx, cy; + assert(thickness >= 0); + assert(clearance >= 0); + assert(mask >= 0); + cx = (x1 + x2) / 2; cy = (y1 + y2) / 2;