Skip to content

Commit

Permalink
Fixed 2 buffer overflows in unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Jan 26, 2018
1 parent 9ee1861 commit 058fc08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions unittest/libmariadb/dyncol.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ static int create_dyncol_num(MYSQL *mysql)
rc= mariadb_dyncol_unpack(&dyncol, &my_count, &my_keys, &my_vals);
diag("unpack: %d %d", rc, my_count);

for(i=0; i < 5; i++)
{
diag("%s %lu", my_keys[i].str, (unsigned long)my_keys[i].length);
}
free(my_keys);
free(my_vals);

Expand Down
2 changes: 1 addition & 1 deletion unittest/libmariadb/errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static int test_parse_error_and_bad_length(MYSQL *mysql)

rc= mysql_query(mysql, "SHOW DATABAAAA");
FAIL_UNLESS(rc, "Error expected");
rc= mysql_real_query(mysql, "SHOW DATABASES", 100);
rc= mysql_real_query(mysql, "SHOW DATABASES\0AAA", 18);
FAIL_UNLESS(rc, "Error expected");

stmt= mysql_stmt_init(mysql);
Expand Down

0 comments on commit 058fc08

Please sign in to comment.