File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1- /* $Id: igd_desc_parse.c,v 1.16 2014/11/17 17:19:13 nanard Exp $ */
1+ /* $Id: igd_desc_parse.c,v 1.17 2015/09/15 13:30:04 nanard Exp $ */
22/* Project : miniupnp
33 * http://miniupnp.free.fr/
44 * Author : Thomas Bernard
5- * Copyright (c) 2005-2014 Thomas Bernard
5+ * Copyright (c) 2005-2015 Thomas Bernard
66 * This software is subject to the conditions detailed in the
77 * LICENCE file provided in this distribution. */
88
1515void IGDstartelt (void * d , const char * name , int l )
1616{
1717 struct IGDdatas * datas = (struct IGDdatas * )d ;
18- memcpy ( datas -> cureltname , name , l );
18+ if (l >= MINIUPNPC_URL_MAXSIZE )
19+ l = MINIUPNPC_URL_MAXSIZE - 1 ;
20+ memcpy (datas -> cureltname , name , l );
1921 datas -> cureltname [l ] = '\0' ;
2022 datas -> level ++ ;
2123 if ( (l == 7 ) && !memcmp (name , "service" , l ) ) {
You can’t perform that action at this time.
0 commit comments