diff -Nru rcssserver-15.0.0/ChangeLog rcssserver-15.0.1/ChangeLog --- rcssserver-15.0.0/ChangeLog 2011-05-16 10:08:36.000000000 +0000 +++ rcssserver-15.0.1/ChangeLog 2011-06-07 02:44:55.000000000 +0000 @@ -1,3 +1,19 @@ +2011-06-07 Hidehisa Akiyama + + * NEWS: + * configure.ac: + - updated a point version number. Official release 15.0.1. + + * src/clangmsgbuilder.cpp: + - added exception handlings for illegal clang name/id strings. + +2011-05-29 Hidehisa Akiyama + + * src/clangmsgbuilder.cpp: + * src/coach.cpp: + - set the restriction to the length of directive name string. + - added exception handlings for illegal clang directive names. + 2011-05-15 Hidehisa Akiyama * NEWS: diff -Nru rcssserver-15.0.0/configure rcssserver-15.0.1/configure --- rcssserver-15.0.0/configure 2011-05-19 01:07:03.000000000 +0000 +++ rcssserver-15.0.1/configure 2011-06-07 02:39:12.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for RCSSServer 15.0.0. +# Generated by GNU Autoconf 2.67 for RCSSServer 15.0.1. # # Report bugs to . # @@ -701,8 +701,8 @@ # Identity of this package. PACKAGE_NAME='RCSSServer' PACKAGE_TARNAME='rcssserver' -PACKAGE_VERSION='15.0.0' -PACKAGE_STRING='RCSSServer 15.0.0' +PACKAGE_VERSION='15.0.1' +PACKAGE_STRING='RCSSServer 15.0.1' PACKAGE_BUGREPORT='sserver-admin@users.sf.net' PACKAGE_URL='' @@ -1452,7 +1452,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures RCSSServer 15.0.0 to adapt to many kinds of systems. +\`configure' configures RCSSServer 15.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1522,7 +1522,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of RCSSServer 15.0.0:";; + short | recursive ) echo "Configuration of RCSSServer 15.0.1:";; esac cat <<\_ACEOF @@ -1652,7 +1652,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -RCSSServer configure 15.0.0 +RCSSServer configure 15.0.1 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2323,7 +2323,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by RCSSServer $as_me 15.0.0, which was +It was created by RCSSServer $as_me 15.0.1, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -3140,7 +3140,7 @@ # Define the identity of the package. PACKAGE='rcssserver' - VERSION='15.0.0' + VERSION='15.0.1' cat >>confdefs.h <<_ACEOF @@ -17912,7 +17912,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by RCSSServer $as_me 15.0.0, which was +This file was extended by RCSSServer $as_me 15.0.1, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17978,7 +17978,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -RCSSServer config.status 15.0.0 +RCSSServer config.status 15.0.1 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff -Nru rcssserver-15.0.0/configure.ac rcssserver-15.0.1/configure.ac --- rcssserver-15.0.0/configure.ac 2011-05-16 10:08:36.000000000 +0000 +++ rcssserver-15.0.1/configure.ac 2011-06-07 02:37:01.000000000 +0000 @@ -3,7 +3,7 @@ AC_PREREQ(2.61) LT_PREREQ([2.2]) -AC_INIT([RCSSServer],[15.0.0],[sserver-admin@users.sf.net],[rcssserver]) +AC_INIT([RCSSServer],[15.0.1],[sserver-admin@users.sf.net],[rcssserver]) #AM_INIT_AUTOMAKE([gnu 1.7.2 check-news dist-bzip2 dist-zip]) AM_INIT_AUTOMAKE([gnu 1.7.2 check-news]) diff -Nru rcssserver-15.0.0/debian/changelog rcssserver-15.0.1/debian/changelog --- rcssserver-15.0.0/debian/changelog 2011-05-19 08:44:38.000000000 +0000 +++ rcssserver-15.0.1/debian/changelog 2011-10-25 16:16:47.000000000 +0000 @@ -1,5 +1,5 @@ -rcssserver (15.0.0-1natty2) natty; urgency=high +rcssserver (15.0.1-0natty1) natty; urgency=high * Stable release - -- Hossein Ansari Thu, 19 May 2011 11:37:38 +0430 + -- Hossein Ansari Tue, 25 Oct 2011 11:37:38 +0430 diff -Nru rcssserver-15.0.0/debian/README.Debian rcssserver-15.0.1/debian/README.Debian --- rcssserver-15.0.0/debian/README.Debian 2011-05-19 07:04:49.000000000 +0000 +++ rcssserver-15.0.1/debian/README.Debian 2011-10-25 16:16:14.000000000 +0000 @@ -3,4 +3,4 @@ - -- Hossein Ansari Thu, 19 May 2011 11:34:38 +0430 + -- Hossein Ansari Tue, 25 Oct 2011 11:34:38 +0430 diff -Nru rcssserver-15.0.0/debian/rules rcssserver-15.0.1/debian/rules --- rcssserver-15.0.0/debian/rules 2011-05-19 08:36:17.000000000 +0000 +++ rcssserver-15.0.1/debian/rules 2011-10-25 16:16:14.000000000 +0000 @@ -7,7 +7,7 @@ # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script @@ -49,7 +49,7 @@ dh_testdir # Add here commands to compile the package. - $(MAKE) + $(MAKE) -j3 touch $@ diff -Nru rcssserver-15.0.0/ltmain.sh rcssserver-15.0.1/ltmain.sh --- rcssserver-15.0.0/ltmain.sh 2011-05-19 01:07:00.000000000 +0000 +++ rcssserver-15.0.1/ltmain.sh 2011-06-07 02:39:10.000000000 +0000 @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" TIMESTAMP="" package_revision=1.3017 diff -Nru rcssserver-15.0.0/NEWS rcssserver-15.0.1/NEWS --- rcssserver-15.0.0/NEWS 2011-05-19 04:16:38.000000000 +0000 +++ rcssserver-15.0.1/NEWS 2011-06-07 02:36:49.000000000 +0000 @@ -1,3 +1,7 @@ +[15.0.1] + * Fixed a defect of clang specification. Now, directive names or + ID strings are limited within 8 characters. + [15.0.0] * New parameters: - server::red_card_probability (default value: 0.0) diff -Nru rcssserver-15.0.0/src/clangmsgbuilder.cpp rcssserver-15.0.1/src/clangmsgbuilder.cpp --- rcssserver-15.0.0/src/clangmsgbuilder.cpp 2011-04-04 03:51:23.000000000 +0000 +++ rcssserver-15.0.1/src/clangmsgbuilder.cpp 2011-06-07 02:29:25.000000000 +0000 @@ -42,6 +42,10 @@ namespace rcss { namespace clang { +namespace { +const size_t STR_SIZE = 8; +} + template< typename X > inline @@ -931,6 +935,11 @@ MsgBuilder::buildDefineCond( const std::string & name ) { traceBuild< DefCond * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DefCond( name, checkAndGetCond() ) ); } @@ -939,6 +948,11 @@ MsgBuilder::buildDefineDir( const std::string & name ) { traceBuild< DefDir * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DefDir( name, checkAndGetDir() ) ); } @@ -947,6 +961,11 @@ MsgBuilder::buildDefineReg( const std::string & name ) { traceBuild< DefReg * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DefReg( name, checkAndGetRegion() ) ); } @@ -955,6 +974,11 @@ MsgBuilder::buildDefineAct( const std::string & name ) { traceBuild< DefAct * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DefAct( name, checkAndGetAction() ) ); } @@ -1115,6 +1139,11 @@ MsgBuilder::buildActNamed( const std::string & name ) { traceBuild< ActNamed * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new ActNamed( name ) ); } @@ -1205,6 +1234,11 @@ MsgBuilder::buildDirNamed( const std::string& name ) { traceBuild< DirNamed * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DirNamed( name ) ); } @@ -1293,6 +1327,11 @@ MsgBuilder::buildCondNamed( const std::string & name ) { traceBuild< CondNamed * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new CondNamed( name ) ); } @@ -1413,6 +1452,11 @@ MsgBuilder::buildRegNamed( const std::string & name ) { traceBuild< RegNamed * >(); + if ( name.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new RegNamed( name ) ); } @@ -1572,6 +1616,11 @@ MsgBuilder::buildRuleID( const std::string & id ) { traceBuild< RuleMsg * >(); + if ( id.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( id ); } @@ -1625,6 +1674,11 @@ MsgBuilder::buildDefineModelRule( const std::string & id ) { traceBuild< DefRule * >(); + if ( id.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DefRule( id, checkAndGetRule(), true ) ); } @@ -1633,6 +1687,11 @@ MsgBuilder::buildDefineDirectiveRule( const std::string & id ) { traceBuild< DefRule * >(); + if ( id.length() > STR_SIZE ) + { + throw BuilderErr( __FILE__, __LINE__, + "Over the max string size." ); + } add( new DefRule( id, checkAndGetRule(), false ) ); } diff -Nru rcssserver-15.0.0/src/coach.cpp rcssserver-15.0.1/src/coach.cpp --- rcssserver-15.0.0/src/coach.cpp 2011-05-16 10:08:36.000000000 +0000 +++ rcssserver-15.0.1/src/coach.cpp 2011-06-04 07:42:23.000000000 +0000 @@ -1309,7 +1309,23 @@ rcss::clang::Parser parser( builder ); - int ret = parser.parse( command ); + int ret = 1; + try + { + ret = parser.parse( command ); + } + catch ( std::exception & e ) + { + std::cerr << e.what() << std::endl; + if ( builder.getMsg() != NULL ) + { + rcss::clang::Msg * msg = builder.detatchMsg().release(); + delete msg; + } + send( "(error could_not_parse_say)" ); + return; + } + if ( ret == 0 && builder.getMsg() != NULL ) { //succeful parse @@ -1456,6 +1472,11 @@ } else { + if ( builder.getMsg() != NULL ) + { + rcss::clang::Msg * msg = builder.detatchMsg().release(); + delete msg; + } send( "(error could_not_parse_say)" ); } }