From 471437fd47bc10ce89b290c46ffcbb260aaa12f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Dec 2007 01:02:28 +0100 Subject: make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows --- extra/CMakeLists.txt | 3 +++ extra/resolveip.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'extra') diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index a909bc93820..c1477e41a81 100755 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -44,6 +44,9 @@ TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock3 ADD_EXECUTABLE(perror perror.c) TARGET_LINK_LIBRARIES(perror strings mysys debug dbug wsock32) +ADD_EXECUTABLE(resolveip resolveip.c) +TARGET_LINK_LIBRARIES(resolveip strings mysys debug dbug wsock32) + ADD_EXECUTABLE(replace replace.c) TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32) diff --git a/extra/resolveip.c b/extra/resolveip.c index 1061cafe380..b48a782c9c9 100644 --- a/extra/resolveip.c +++ b/extra/resolveip.c @@ -21,13 +21,15 @@ #include #include #include -#include -#include -#ifndef HAVE_BROKEN_NETINET_INCLUDES -#include +#ifndef WIN32 +# include +# include +# ifndef HAVE_BROKEN_NETINET_INCLUDES +# include +# endif +# include +# include #endif -#include -#include #include #include -- cgit v1.2.1 From d8ca1f6c8de8c54131b5d9e8e15167cd48740bf3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Jan 2008 13:20:03 +0100 Subject: Bug#33814 - yassl problems extra/yassl/src/template_instnt.cpp: new template instantiation --- extra/yassl/src/handshake.cpp | 5 +++++ extra/yassl/src/template_instnt.cpp | 1 + extra/yassl/src/yassl_imp.cpp | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'extra') diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index 0cd0dfe9c7c..15be8eeb65d 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -527,6 +527,11 @@ void ProcessOldClientHello(input_buffer& input, SSL& ssl) input.read(len, sizeof(len)); uint16 randomLen; ato16(len, randomLen); + if (ch.suite_len_ > MAX_SUITE_SZ || sessionLen > ID_LEN || + randomLen > RAN_LEN) { + ssl.SetError(bad_input); + return; + } int j = 0; for (uint16 i = 0; i < ch.suite_len_; i += 3) { diff --git a/extra/yassl/src/template_instnt.cpp b/extra/yassl/src/template_instnt.cpp index f82f7924359..fe3a251b865 100644 --- a/extra/yassl/src/template_instnt.cpp +++ b/extra/yassl/src/template_instnt.cpp @@ -101,6 +101,7 @@ template void ysArrayDelete(unsigned char*); template void ysArrayDelete(char*); template int min(int, int); +template uint16 min(uint16, uint16); template unsigned int min(unsigned int, unsigned int); template unsigned long min(unsigned long, unsigned long); } diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index 0bc95f64abc..b43d9c27355 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -621,6 +621,10 @@ void HandShakeHeader::Process(input_buffer& input, SSL& ssl) } uint len = c24to32(length_); + if (len > input.get_remaining()) { + ssl.SetError(bad_input); + return; + } hashHandShake(ssl, input, len); hs->set_length(len); @@ -1391,10 +1395,15 @@ input_buffer& operator>>(input_buffer& input, ClientHello& hello) // Suites byte tmp[2]; + uint16 len; tmp[0] = input[AUTO]; tmp[1] = input[AUTO]; - ato16(tmp, hello.suite_len_); + ato16(tmp, len); + + hello.suite_len_ = min(len, static_cast(MAX_SUITE_SZ)); input.read(hello.cipher_suites_, hello.suite_len_); + if (len > hello.suite_len_) // ignore extra suites + input.set_current(input.get_current() + len - hello.suite_len_); // Compression hello.comp_len_ = input[AUTO]; -- cgit v1.2.1