summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-25 18:43:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-25 18:43:31 +0000
commit276ef60b0dde011be3b608a20c70af69a2154e63 (patch)
treea5398ac015bb065cb74313a8cc80a13498bc474b /usr.bin
parent6cefd86c7f15ded201ab874fc5eb0a13a1265ceb (diff)
use strtonum() instead of atoi() [limit X screens to 400, sorry]
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 4952dda04d0..925ada5e29c 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.244 2006/03/25 13:17:01 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.245 2006/03/25 18:43:30 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3045,7 +3045,7 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
if (cp)
cp = strchr(cp, '.');
if (cp)
- screen_number = atoi(cp + 1);
+ screen_number = (u_int)strtonum(cp + 1, 0, 400, NULL);
else
screen_number = 0;