summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-26 14:28:32 +1100
committerDamien Miller <djm@mindrot.org>2006-03-26 14:28:32 +1100
commit08d61505d7229aaa5484439b2f2e98add3052afe (patch)
tree4d3938cba3683bf29da0286b09b3f2dd4e1c06d5
parent1c13bd8d799ced6e2e8234a1d2409c30e7d67815 (diff)
- deraadt@cvs.openbsd.org 2006/03/25 18:43:30
[channels.c] use strtonum() instead of atoi() [limit X screens to 400, sorry]
-rw-r--r--ChangeLog5
-rw-r--r--channels.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ca0156c7..da5a1ded5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -165,6 +165,9 @@
165 - deraadt@cvs.openbsd.org 2006/03/25 18:41:45 165 - deraadt@cvs.openbsd.org 2006/03/25 18:41:45
166 [ssh-agent.c] 166 [ssh-agent.c]
167 mark two more signal handlers ARGSUSED 167 mark two more signal handlers ARGSUSED
168 - deraadt@cvs.openbsd.org 2006/03/25 18:43:30
169 [channels.c]
170 use strtonum() instead of atoi() [limit X screens to 400, sorry]
168 171
16920060325 17220060325
170 - OpenBSD CVS Sync 173 - OpenBSD CVS Sync
@@ -4422,4 +4425,4 @@
4422 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 4425 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
4423 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 4426 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
4424 4427
4425$Id: ChangeLog,v 1.4282 2006/03/26 03:28:14 djm Exp $ 4428$Id: ChangeLog,v 1.4283 2006/03/26 03:28:32 djm Exp $
diff --git a/channels.c b/channels.c
index c838b8534..70ffd7b33 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.244 2006/03/25 13:17:01 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.245 2006/03/25 18:43:30 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3079,7 +3079,7 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
3079 if (cp) 3079 if (cp)
3080 cp = strchr(cp, '.'); 3080 cp = strchr(cp, '.');
3081 if (cp) 3081 if (cp)
3082 screen_number = atoi(cp + 1); 3082 screen_number = (u_int)strtonum(cp + 1, 0, 400, NULL);
3083 else 3083 else
3084 screen_number = 0; 3084 screen_number = 0;
3085 3085