=== modified file 'libmysql/libmysql.c' --- libmysql/libmysql.c 2010-01-18 20:19:19 +0000 +++ libmysql/libmysql.c 2010-02-17 22:28:56 +0000 @@ -900,7 +897,7 @@ mysql_list_fields(MYSQL *mysql, const ch { MYSQL_RES *result; MYSQL_FIELD *fields; - char buff[258],*end; + char buff[257],*end; DBUG_ENTER("mysql_list_fields"); DBUG_PRINT("enter",("table: '%s' wild: '%s'",table,wild ? wild : "")); @@ -1906,7 +1903,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *st /* Store type of parameter in network buffer. */ -static void store_param_type(unsigned char **pos, MYSQL_BIND *param) +static void store_param_type(char **pos, MYSQL_BIND *param) { uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0); int2store(*pos, typecode); @@ -2185,7 +2182,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt) that is sent to the server. */ for (param= stmt->params; param < param_end ; param++) - store_param_type(&net->write_pos, param); + store_param_type((char**) &net->write_pos, param); } for (param= stmt->params; param < param_end; param++) === modified file 'mysys/default.c' --- mysys/default.c 2009-12-24 07:56:13 +0000 +++ mysys/default.c 2010-02-17 22:28:56 +0000 @@ -683,7 +683,7 @@ static int search_default_file_with_ext( int recursion_level) { char name[FN_REFLEN + 10], buff[4096], curr_gr[4096], *ptr, *end, **tmp_ext; - char *value, option[4096+2], tmp[FN_REFLEN]; + char *value, option[4096], tmp[FN_REFLEN]; static const char includedir_keyword[]= "includedir"; static const char include_keyword[]= "include"; const int max_recursion_level= 10; === modified file 'mysys/mf_pack.c' --- mysys/mf_pack.c 2009-12-18 18:44:24 +0000 +++ mysys/mf_pack.c 2010-02-17 22:28:56 +0000 @@ -245,7 +245,7 @@ my_bool my_use_symdir=0; /* Set this if #ifdef USE_SYMDIR void symdirget(char *dir) { - char buff[FN_REFLEN+1]; + char buff[FN_REFLEN]; char *pos=strend(dir); if (dir[0] && pos[-1] != FN_DEVCHAR && my_access(dir, F_OK)) { @@ -257,7 +257,7 @@ void symdirget(char *dir) *pos++=temp; *pos=0; /* Restore old filename */ if (file >= 0) { - if ((length= my_read(file, buff, sizeof(buff) - 1, MYF(0))) > 0) + if ((length= my_read(file, buff, sizeof(buff), MYF(0))) > 0) { for (pos= buff + length ; pos > buff && (iscntrl(pos[-1]) || isspace(pos[-1])) ; === modified file 'sql/log.cc' --- sql/log.cc 2010-02-15 11:16:49 +0000 +++ sql/log.cc 2010-02-17 22:28:56 +0000 @@ -2638,7 +2638,7 @@ const char *MYSQL_LOG::generate_name(con { char *p= fn_ext(log_name); uint length= (uint) (p - log_name); - strmake(buff, log_name, min(length, FN_REFLEN-1)); + strmake(buff, log_name, min(length, FN_REFLEN)); return (const char*)buff; } return log_name; @@ -3901,7 +3901,7 @@ int MYSQL_BIN_LOG::purge_logs_before_dat if (stat_area.st_mtime < purge_time) strmake(to_log, log_info.log_file_name, - sizeof(log_info.log_file_name) - 1); + sizeof(log_info.log_file_name)); else break; } @@ -5370,11 +5370,11 @@ bool flush_error_log() if (opt_error_log) { char err_renamed[FN_REFLEN], *end; - end= strmake(err_renamed,log_error_file,FN_REFLEN-5); + end= strmake(err_renamed,log_error_file,FN_REFLEN-4); strmov(end, "-old"); mysql_mutex_lock(&LOCK_error_log); #ifdef __WIN__ - char err_temp[FN_REFLEN+5]; + char err_temp[FN_REFLEN+4]; /* On Windows is necessary a temporary file for to rename the current error file. === modified file 'sql/sql_connect.cc' --- sql/sql_connect.cc 2010-01-25 16:48:45 +0000 +++ sql/sql_connect.cc 2010-02-17 22:28:56 +0000 @@ -727,7 +727,7 @@ static int check_connection(THD *thd) ulong server_capabilites; { /* buff[] needs to big enough to hold the server_version variable */ - char buff[SERVER_VERSION_LENGTH + 1 + SCRAMBLE_LENGTH + 1 + 64]; + char buff[SERVER_VERSION_LENGTH + SCRAMBLE_LENGTH + 64]; server_capabilites= CLIENT_BASIC_FLAGS; if (opt_using_transactions)