Signed integer overflow in function `compute_ellarc`
Xfig is a diagramming tool
Brought to you by:
tklxfiguser
When running the tests with enabled sanitizers (address, undefined), I encountered a signed integer overflow on bound.c, line 1306:
radius = round(sqrt(rx * rx + ry * ry));
My suggested fix is to use the function hypot from the standard library or to convert to double, similar to how it's done on line 989:
l = sqrt((double)dx * dx + (double)dy * dy);
Good point, also, hypot() is not used anywhere in the code. I changed the sqrt(..) in a number of places to hypot, but need to check a bit before committing.
Fixed with commit [6919a3].
Related
Commit: [6919a3]