Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/lib/libsa Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/2a0095b82f24
branches:  netbsd-7
changeset: 799980:2a0095b82f24
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Sep 25 11:28:36 2016 +0000

description:
Pull up following revision(s) (requested by dholland in ticket #1250):
        sys/lib/libsa/checkpasswd.c: revision 1.10
Check bounds on input. From Michael Plass.

diffstat:

 sys/lib/libsa/checkpasswd.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 5acfd0277681 -r 2a0095b82f24 sys/lib/libsa/checkpasswd.c
--- a/sys/lib/libsa/checkpasswd.c       Sun Sep 25 11:24:26 2016 +0000
+++ b/sys/lib/libsa/checkpasswd.c       Sun Sep 25 11:28:36 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: checkpasswd.c,v 1.9 2011/01/06 02:45:13 jakllsch Exp $ */
+/*     $NetBSD: checkpasswd.c,v 1.9.34.1 2016/09/25 11:28:36 bouyer Exp $      */
 
 /*-
  * Copyright (c) 1993
@@ -84,8 +84,10 @@
                        putchar('\n');
                        break;
                default:
-                       *lp++ = c;
-                       putchar('*');
+                       if ((size_t)(lp - buf) < sizeof(buf) - 1) {
+                               *lp++ = c;
+                               putchar('*');
+                       }
                        break;
                }
        }



Home | Main Index | Thread Index | Old Index