diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-12-18 16:44:24 -0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-12-18 16:44:24 -0200 |
commit | 61ae92889808c3c38c5e449e36fc30f89e8e3f23 (patch) | |
tree | 8cb3e4210dd5da0c3cec217f0e5008ee9104715b /libmysql | |
parent | f815246486444ca2dc5d408099439e1d973d3a7b (diff) | |
parent | 06a1df91813ea2c39f7312bcf8af972c7e8a926f (diff) | |
download | mariadb-git-61ae92889808c3c38c5e449e36fc30f89e8e3f23.tar.gz |
Manual merge.
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index aa314e79260..f626361536f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -718,7 +718,10 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, if (!passwd) passwd=""; - /* Store user into the buffer */ + /* + Store user into the buffer. + Advance position as strmake returns a pointer to the closing NUL. + */ end= strmake(end, user, USERNAME_LENGTH) + 1; /* write scrambled password according to server capabilities */ @@ -1268,7 +1271,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) { MYSQL_RES *result; MYSQL_FIELD *fields; - char buff[257],*end; + char buff[258],*end; DBUG_ENTER("mysql_list_fields"); DBUG_PRINT("enter",("table: '%s' wild: '%s'",table,wild ? wild : "")); |