FreeBSD Bugzilla – Attachment 192294 Details for
Bug 227329
[PATCH] bin/expr: do not fail with "overflow" if no overflow occurs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix the issue
expr.patch (text/plain), 488 bytes, created by
tobias
on 2018-04-06 18:53:41 UTC
(
hide
)
Description:
Patch to fix the issue
Filename:
MIME Type:
Creator:
tobias
Created:
2018-04-06 18:53:41 UTC
Size:
488 bytes
patch
obsolete
>Index: expr.y >=================================================================== >--- expr.y (revision 331546) >+++ expr.y (working copy) >@@ -422,11 +422,9 @@ > void > assert_minus(intmax_t a, intmax_t b, intmax_t r) > { >- /* special case subtraction of INTMAX_MIN */ >- if (b == INTMAX_MIN && a < 0) >+ if ((a >= 0 && b < 0 && r <= 0) || >+ (a < 0 && b > 0 && r >= 0)) > errx(ERR_EXIT, "overflow"); >- /* check addition of negative subtrahend */ >- assert_plus(a, -b, r); > } > > struct val *
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227329
: 192294