]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- dtucker@cvs.openbsd.org 2014/01/19 04:17:29
authorDarren Tucker <dtucker@zip.com.au>
Sun, 19 Jan 2014 04:30:02 +0000 (15:30 +1100)
committerDarren Tucker <dtucker@zip.com.au>
Sun, 19 Jan 2014 04:30:02 +0000 (15:30 +1100)
     [canohost.c addrmatch.c]
     Cast socklen_t when comparing to size_t and use socklen_t to iterate over
     the ip options, both to prevent signed/unsigned comparison warnings.
     Patch from vinschen at redhat via portable openssh, begrudging ok deraadt.

ChangeLog
addrmatch.c
canohost.c

index d274fc4eaef48033ca64e8b4ea7e924ff0a24300..847be14609771359e2abc192fbe487bdc16fc9d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,7 +6,13 @@
    - dtucker@cvs.openbsd.org 2014/01/18 09:36:26
      [session.c]
      explicitly define USE_PIPES to 1 to prevent redefinition warnings in
-     portable on platforms that use pipes for everything.
+     portable on platforms that use pipes for everything.  From vinschen at
+     redhat.
+   - dtucker@cvs.openbsd.org 2014/01/19 04:17:29
+     [canohost.c addrmatch.c]
+     Cast socklen_t when comparing to size_t and use socklen_t to iterate over
+     the ip options, both to prevent signed/unsigned comparison warnings.
+     Patch from vinschen at redhat via portable openssh, begrudging ok deraadt.
 
 20140118
  - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin.  Patch
index fb6de92e777bf2a680d977b514195776a59d024b..649de4139be0e3d8a0703f149d669b91306a7e7b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: addrmatch.c,v 1.7 2013/05/17 00:13:13 djm Exp $ */
+/*     $OpenBSD: addrmatch.c,v 1.8 2014/01/19 04:17:29 dtucker Exp $ */
 
 /*
  * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -88,13 +88,13 @@ addr_sa_to_xaddr(struct sockaddr *sa, socklen_t slen, struct xaddr *xa)
 
        switch (sa->sa_family) {
        case AF_INET:
-               if (slen < sizeof(*in4))
+               if ((size_t)slen < sizeof(*in4))
                        return -1;
                xa->af = AF_INET;
                memcpy(&xa->v4, &in4->sin_addr, sizeof(xa->v4));
                break;
        case AF_INET6:
-               if (slen < sizeof(*in6))
+               if ((size_t)slen < sizeof(*in6))
                        return -1;
                xa->af = AF_INET6;
                memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6));
index 2e5a0b86e1f7e8beb30dec264dbd4364742bdaf7..a19a60cdaffc8c404dc77a7f3a6b1d1a7627cf33 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: canohost.c,v 1.69 2013/11/20 20:54:10 deraadt Exp $ */
+/* $OpenBSD: canohost.c,v 1.70 2014/01/19 04:17:29 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -154,8 +154,7 @@ check_ip_options(int sock, char *ipaddr)
 #ifdef IP_OPTIONS
        u_char options[200];
        char text[sizeof(options) * 3 + 1];
-       socklen_t option_size;
-       u_int i;
+       socklen_t option_size, i;
        int ipproto;
        struct protoent *ip;