From 1ea7166019154c4e4c829ff5b170b778a5a4cab7 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 14 May 2003 22:33:58 +1000 Subject: [PATCH] - (djm) Bug #258: sscanf("[0-9]") -> sscanf("[0123456789]") for portability --- ChangeLog | 3 ++- ssh.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f11ce1e7..46d14e74d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -84,6 +84,7 @@ - (djm) Die screaming if start_pam() is called when UsePAM=no - (djm) Avoid KrbV leak for MIT Kerberos - (dtucker) Set ai_socktype and ai_protocol in fake-getaddrinfo.c. ok djm@ + - (djm) Bug #258: sscanf("[0-9]") -> sscanf("[0123456789]") for portability 20030512 - (djm) Redhat spec: Don't install profile.d scripts when not @@ -1471,4 +1472,4 @@ save auth method before monitor_reset_key_state(); bugzilla bug #284; ok provos@ -$Id: ChangeLog,v 1.2699 2003/05/14 11:48:51 dtucker Exp $ +$Id: ChangeLog,v 1.2700 2003/05/14 12:33:58 djm Exp $ diff --git a/ssh.c b/ssh.c index 6f5a146fe..0e2b7628e 100644 --- a/ssh.c +++ b/ssh.c @@ -427,9 +427,9 @@ again: case 'L': case 'R': - if (sscanf(optarg, "%5[0-9]:%255[^:]:%5[0-9]", + if (sscanf(optarg, "%5[0123456789]:%255[^:]:%5[0123456789]", sfwd_port, buf, sfwd_host_port) != 3 && - sscanf(optarg, "%5[0-9]/%255[^/]/%5[0-9]", + sscanf(optarg, "%5[0123456789]/%255[^/]/%5[0123456789]", sfwd_port, buf, sfwd_host_port) != 3) { fprintf(stderr, "Bad forwarding specification '%s'\n",