summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--scp.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 10de1077e..86da2761c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,9 @@
23 - djm@cvs.openbsd.org 2013/06/21 05:42:32 23 - djm@cvs.openbsd.org 2013/06/21 05:42:32
24 [dh.c] 24 [dh.c]
25 sprinkle in some error() to explain moduli(5) parse failures 25 sprinkle in some error() to explain moduli(5) parse failures
26 - djm@cvs.openbsd.org 2013/06/21 05:43:10
27 [scp.c]
28 make this -Wsign-compare clean after time_t conversion
26 29
2720130702 3020130702
28 - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config 31 - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config
diff --git a/scp.c b/scp.c
index ca7948f62..958faf3fc 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.176 2013/06/17 04:48:42 guenther Exp $ */ 1/* $OpenBSD: scp.c,v 1.177 2013/06/21 05:43:10 djm Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -976,7 +976,7 @@ sink(int argc, char **argv)
976 ull = strtoull(cp, &cp, 10); 976 ull = strtoull(cp, &cp, 10);
977 if (!cp || *cp++ != ' ') 977 if (!cp || *cp++ != ' ')
978 SCREWUP("mtime.sec not delimited"); 978 SCREWUP("mtime.sec not delimited");
979 if ((time_t)ull < 0 || (time_t)ull != ull) 979 if ((time_t)ull < 0 || ull > LLONG_MAX)
980 setimes = 0; /* out of range */ 980 setimes = 0; /* out of range */
981 mtime.tv_sec = ull; 981 mtime.tv_sec = ull;
982 mtime.tv_usec = strtol(cp, &cp, 10); 982 mtime.tv_usec = strtol(cp, &cp, 10);
@@ -988,7 +988,7 @@ sink(int argc, char **argv)
988 ull = strtoull(cp, &cp, 10); 988 ull = strtoull(cp, &cp, 10);
989 if (!cp || *cp++ != ' ') 989 if (!cp || *cp++ != ' ')
990 SCREWUP("atime.sec not delimited"); 990 SCREWUP("atime.sec not delimited");
991 if ((time_t)ull < 0 || (time_t)ull != ull) 991 if ((time_t)ull < 0 || ull > LLONG_MAX)
992 setimes = 0; /* out of range */ 992 setimes = 0; /* out of range */
993 atime.tv_sec = ull; 993 atime.tv_sec = ull;
994 atime.tv_usec = strtol(cp, &cp, 10); 994 atime.tv_usec = strtol(cp, &cp, 10);