X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=71836a70a9bdb171b43680f694449f095f2f79bc;hp=34279824eda4c5dadf66f299e2369b928670fe04;hb=a7ad161d2b115b6a2a69c5dc8ddd33008d3562d0;hpb=9fd02ffcb0cacf3de26e876de5f30510bff137a3 diff --git a/src/net.c b/src/net.c index 34279824..71836a70 100644 --- a/src/net.c +++ b/src/net.c @@ -1,6 +1,7 @@ /* net.c -- most of the network code - Copyright (C) 1998,1999,2000 Ivo Timmermans + Copyright (C) 1998,1999,2000 Ivo Timmermans , + 2000 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,6 +16,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + $Id: net.c,v 1.32 2000/05/29 23:40:05 guus Exp $ */ #include "config.h" @@ -970,7 +973,7 @@ cp { if(sscanf(cl->buffer, "%d", &request) == 1) { - if(request_handlers[request] == NULL) + if((request < 0) || (request > 255) || (request_handlers[request] == NULL)) { syslog(LOG_ERR, _("Unknown request: %s"), cl->buffer); return -1;