Bugzilla – Attachment 3579 Details for
Bug 3401
Illegal hardware instruction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check for scaling underflow in scan_scaled.
openssh-scan_scaled-underflow.patch (text/plain), 505 bytes, created by
Darren Tucker
on 2022-03-10 17:36:00 AEDT
(
hide
)
Description:
Check for scaling underflow in scan_scaled.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2022-03-10 17:36:00 AEDT
Size:
505 bytes
patch
obsolete
>diff --git a/openbsd-compat/fmt_scaled.c b/openbsd-compat/fmt_scaled.c >index 2f76ef93..86297988 100644 >--- a/openbsd-compat/fmt_scaled.c >+++ b/openbsd-compat/fmt_scaled.c >@@ -191,7 +191,8 @@ scan_scaled(char *scaled, long long *result) > /* truncate fpart so it doesn't overflow. > * then scale fractional part. > */ >- while (fpart >= LLONG_MAX / scale_fact) { >+ while (fpart >= LLONG_MAX / scale_fact || >+ fpart <= LLONG_MIN / scale_fact) { > fpart /= 10; > fract_digits--; > }
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 3401
:
3578
| 3579