- (djm) Bug #258: sscanf("[0-9]") -> sscanf("[0123456789]") for portability

This commit is contained in:
Damien Miller 2003-05-14 22:33:58 +10:00
parent abef5628e8
commit 1ea7166019
2 changed files with 4 additions and 3 deletions

View File

@ -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 $

4
ssh.c
View File

@ -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",