From: H.G. Muller Date: Thu, 9 Jun 2011 07:54:17 +0000 (+0200) Subject: version 1.4.31b X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ebd82be689a2f048d6a47b3e1a1009e8b0a7555d;p=polyglot.git version 1.4.31b --- diff --git a/ChangeLog b/ChangeLog index ba23d6d..82083d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +=========1.4.31b================ +- Bugfix: improper handling of vararg function. =========1.4.30b================ - Some more meaningful error messages added. - Some buffer overflow checks added. diff --git a/config.h b/config.h index 259287a..2bd2bdb 100644 --- a/config.h +++ b/config.h @@ -115,13 +115,13 @@ #define PACKAGE_NAME "polyglot" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "polyglot 1.4.30b" +#define PACKAGE_STRING "polyglot 1.4.31b" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "polyglot" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.4.30b" +#define PACKAGE_VERSION "1.4.31b" /* Define to 1 if the C compiler supports function prototypes. */ #define PROTOTYPES 1 @@ -150,7 +150,7 @@ #define TIME_WITH_SYS_TIME 1 /* Version number of package */ -#define VERSION "1.4.30b" +#define VERSION "1.4.31b" /* Define like PROTOTYPES; this can be used by system headers. */ #define __PROTOTYPES 1 diff --git a/configure b/configure index cf92c98..5f03879 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for polyglot 1.4.30b. +# Generated by GNU Autoconf 2.61 for polyglot 1.4.31b. # # Report bugs to . # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='polyglot' PACKAGE_TARNAME='polyglot' -PACKAGE_VERSION='1.4.30b' -PACKAGE_STRING='polyglot 1.4.30b' +PACKAGE_VERSION='1.4.31b' +PACKAGE_STRING='polyglot 1.4.31b' PACKAGE_BUGREPORT='michel.vandenbergh@uhasselt.be' ac_unique_file="mainloop.c" @@ -1207,7 +1207,7 @@ if test "$ac_init_help" = "long"; then # 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 polyglot 1.4.30b to adapt to many kinds of systems. +\`configure' configures polyglot 1.4.31b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1273,7 +1273,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of polyglot 1.4.30b:";; + short | recursive ) echo "Configuration of polyglot 1.4.31b:";; esac cat <<\_ACEOF @@ -1357,7 +1357,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -polyglot configure 1.4.30b +polyglot configure 1.4.31b generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1371,7 +1371,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by polyglot $as_me 1.4.30b, which was +It was created by polyglot $as_me 1.4.31b, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2061,7 +2061,7 @@ fi # Define the identity of the package. PACKAGE='polyglot' - VERSION='1.4.30b' + VERSION='1.4.31b' cat >>confdefs.h <<_ACEOF @@ -6848,7 +6848,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by polyglot $as_me 1.4.30b, which was +This file was extended by polyglot $as_me 1.4.31b, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6901,7 +6901,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -polyglot config.status 1.4.30b +polyglot config.status 1.4.31b configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 13bbd54..fa8f0a8 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([polyglot], [1.4.30b], [michel.vandenbergh@uhasselt.be]) +AC_INIT([polyglot], [1.4.31b], [michel.vandenbergh@uhasselt.be]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([mainloop.c]) AC_CONFIG_HEADER([config.h]) diff --git a/engine.c b/engine.c index 4dffd4a..bf7bd49 100644 --- a/engine.c +++ b/engine.c @@ -40,25 +40,31 @@ void engine_set_nice_value(engine_t *engine, int value){ // engine_send_queue() void engine_send_queue(engine_t * engine, const char *format, ...) { + va_list arg_list; if(write_index>=StringSize){ my_fatal("engine_send_queue(): write_buffer overflow\n"); } + va_start(arg_list,format); write_index += vsnprintf(write_buffer + write_index, - StringSize-write_index, + StringSize-write_index, format, - (va_list) (&format + 1)); + arg_list); + va_end(arg_list); } // engine_send() void engine_send(engine_t * engine, const char *format, ...) { + va_list arg_list; if(write_index>=StringSize){ my_fatal("engine_send(): write_buffer overflow\n"); } + va_start(arg_list,format); vsnprintf(write_buffer + write_index, StringSize-write_index, format, - (va_list) (&format + 1)); + arg_list); + va_end(arg_list); pipex_writeln(engine->pipex,write_buffer); write_index = 0; } diff --git a/main.c b/main.c index ad9ecca..9244aa3 100644 --- a/main.c +++ b/main.c @@ -35,7 +35,7 @@ // constants -static const char * const Version = "1.4.30b"; +static const char * const Version = "1.4.31b"; static const char * const HelpMessage = "\ SYNTAX\n\ * polyglot [configfile]\n\ diff --git a/polyglot.spec b/polyglot.spec index 257e04c..7799d73 100644 --- a/polyglot.spec +++ b/polyglot.spec @@ -1,6 +1,6 @@ Summary: A Winboard protocol to UCI protocol adapter Name: polyglot -Version: 1.4.30b +Version: 1.4.31b Release: 1 License: GPL Group: Amusement/Games