From c2b77abe3d7bef4c7e5a47fb3dd7c29e97908a78 Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 23 Oct 2006 17:00:12 +0000 Subject: [PATCH] - (djm) OpenBSD CVS Sync - ray@cvs.openbsd.org 2006/09/30 17:48:22 [sftp.c] Clear errno before calling the strtol functions. From Paul Stoeber . OK deraadt@. --- ChangeLog | 10 +++++++++- sftp.c | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b340d5c..6e0f0fa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +20061023 + - (djm) OpenBSD CVS Sync + - ray@cvs.openbsd.org 2006/09/30 17:48:22 + [sftp.c] + Clear errno before calling the strtol functions. + From Paul Stoeber . + OK deraadt@. + 20061018 - (dtucker) OpenBSD CVS Sync - ray@cvs.openbsd.org 2006/09/25 04:55:38 @@ -2538,4 +2546,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4572 2006/10/18 12:51:31 dtucker Exp $ +$Id: ChangeLog,v 1.4573 2006/10/23 17:00:12 djm Exp $ diff --git a/sftp.c b/sftp.c index c018615a..a39c782f 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.92 2006/09/19 05:52:23 otto Exp $ */ +/* $OpenBSD: sftp.c,v 1.93 2006/09/30 17:48:22 ray Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -977,6 +977,7 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, case I_CHOWN: case I_CHGRP: /* Get numeric arg (mandatory) */ + errno = 0; l = strtol(cp, &cp2, base); if (cp2 == cp || ((l == LONG_MIN || l == LONG_MAX) && errno == ERANGE) || l < 0) { -- 2.11.4.GIT