diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | sftp.c | 3 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,11 @@ | |||
1 | 20061023 | ||
2 | - (djm) OpenBSD CVS Sync | ||
3 | - ray@cvs.openbsd.org 2006/09/30 17:48:22 | ||
4 | [sftp.c] | ||
5 | Clear errno before calling the strtol functions. | ||
6 | From Paul Stoeber <x0001 at x dot de1 dot cc>. | ||
7 | OK deraadt@. | ||
8 | |||
1 | 20061018 | 9 | 20061018 |
2 | - (dtucker) OpenBSD CVS Sync | 10 | - (dtucker) OpenBSD CVS Sync |
3 | - ray@cvs.openbsd.org 2006/09/25 04:55:38 | 11 | - ray@cvs.openbsd.org 2006/09/25 04:55:38 |
@@ -2538,4 +2546,4 @@ | |||
2538 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 2546 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
2539 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 2547 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
2540 | 2548 | ||
2541 | $Id: ChangeLog,v 1.4572 2006/10/18 12:51:31 dtucker Exp $ | 2549 | $Id: ChangeLog,v 1.4573 2006/10/23 17:00:12 djm Exp $ |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.92 2006/09/19 05:52:23 otto Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.93 2006/09/30 17:48:22 ray Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -977,6 +977,7 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, | |||
977 | case I_CHOWN: | 977 | case I_CHOWN: |
978 | case I_CHGRP: | 978 | case I_CHGRP: |
979 | /* Get numeric arg (mandatory) */ | 979 | /* Get numeric arg (mandatory) */ |
980 | errno = 0; | ||
980 | l = strtol(cp, &cp2, base); | 981 | l = strtol(cp, &cp2, base); |
981 | if (cp2 == cp || ((l == LONG_MIN || l == LONG_MAX) && | 982 | if (cp2 == cp || ((l == LONG_MIN || l == LONG_MAX) && |
982 | errno == ERANGE) || l < 0) { | 983 | errno == ERANGE) || l < 0) { |