summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/scp.c b/scp.c
index 958faf3fc..28ded5e9a 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.177 2013/06/21 05:43:10 djm Exp $ */ 1/* $OpenBSD: scp.c,v 1.178 2013/06/22 06:31:57 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,8 @@ 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 || ull > LLONG_MAX) 979 if ((time_t)ull < 0 ||
980 (unsigned long long)(time_t)ull != ull)
980 setimes = 0; /* out of range */ 981 setimes = 0; /* out of range */
981 mtime.tv_sec = ull; 982 mtime.tv_sec = ull;
982 mtime.tv_usec = strtol(cp, &cp, 10); 983 mtime.tv_usec = strtol(cp, &cp, 10);
@@ -988,7 +989,8 @@ sink(int argc, char **argv)
988 ull = strtoull(cp, &cp, 10); 989 ull = strtoull(cp, &cp, 10);
989 if (!cp || *cp++ != ' ') 990 if (!cp || *cp++ != ' ')
990 SCREWUP("atime.sec not delimited"); 991 SCREWUP("atime.sec not delimited");
991 if ((time_t)ull < 0 || ull > LLONG_MAX) 992 if ((time_t)ull < 0 ||
993 (unsigned long long)(time_t)ull != ull)
992 setimes = 0; /* out of range */ 994 setimes = 0; /* out of range */
993 atime.tv_sec = ull; 995 atime.tv_sec = ull;
994 atime.tv_usec = strtol(cp, &cp, 10); 996 atime.tv_usec = strtol(cp, &cp, 10);