[openssh-commits] [openssh] 01/03: Import fmt_scaled.c rev 1.14 from OpenBSD.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Mar 29 16:35:51 AEDT 2017


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit d427b73bf5a564f663d16546dbcbd84ba8b9d4af
Author: Darren Tucker <dtucker at zip.com.au>
Date:   Wed Mar 29 16:32:57 2017 +1100

    Import fmt_scaled.c rev 1.14 from OpenBSD.
    
    Catch integer underflow in scan_scaled reported by Nicolas Iooss.
    ok deraadt@ djm@
---
 openbsd-compat/fmt_scaled.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/openbsd-compat/fmt_scaled.c b/openbsd-compat/fmt_scaled.c
index e5533b2..7e6a57d 100644
--- a/openbsd-compat/fmt_scaled.c
+++ b/openbsd-compat/fmt_scaled.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: fmt_scaled.c,v 1.13 2017/03/11 23:37:23 djm Exp $	*/
+/*	$OpenBSD: fmt_scaled.c,v 1.14 2017/03/15 00:13:18 dtucker Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Ian F. Darwin.  All rights reserved.
@@ -175,6 +175,11 @@ scan_scaled(char *scaled, long long *result)
 				return -1;
 			}
 
+			if (whole <= LLONG_MIN / scale_fact) {
+				errno = ERANGE;
+				return -1;
+			}
+
 			/* scale whole part */
 			whole *= scale_fact;
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list