-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix division of numerator 0 #310
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #310 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 10 10
Lines 1890 1890
=======================================
Hits 1889 1889
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
51f866d
to
3886b49
Compare
It could segfault theoretically on out of buffer access? |
No. The |
In other words, executing tests in |
3886b49
to
5510a01
Compare
In case the division numerator is 0 its computed number of words `m` is also 0. Then avoid accessing `un[m-1]`. This is not a critical bug because in the worst case we increased the `m` by 1 but results were computed correctly.
|
In case the division numerator is 0 its computed number of words
m
is also 0. Then avoid accessingun[m-1]
.This is not a critical bug because in the worst case we increased the
m
by 1 but results were computed correctly.