diff options
-rw-r--r-- | usr.bin/ssh/scp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index f36286b3fe7..ad08bc0ca1d 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.176 2013/06/17 04:48:42 guenther Exp $ */ +/* $OpenBSD: scp.c,v 1.177 2013/06/21 05:43:10 djm Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -955,7 +955,7 @@ sink(int argc, char **argv) ull = strtoull(cp, &cp, 10); if (!cp || *cp++ != ' ') SCREWUP("mtime.sec not delimited"); - if ((time_t)ull < 0 || (time_t)ull != ull) + if ((time_t)ull < 0 || ull > LLONG_MAX) setimes = 0; /* out of range */ mtime.tv_sec = ull; mtime.tv_usec = strtol(cp, &cp, 10); @@ -967,7 +967,7 @@ sink(int argc, char **argv) ull = strtoull(cp, &cp, 10); if (!cp || *cp++ != ' ') SCREWUP("atime.sec not delimited"); - if ((time_t)ull < 0 || (time_t)ull != ull) + if ((time_t)ull < 0 || ull > LLONG_MAX) setimes = 0; /* out of range */ atime.tv_sec = ull; atime.tv_usec = strtol(cp, &cp, 10); |