[mysql] Fix misalign in mysql fuzz target (#3160)

This commit is contained in:
Catena cyber 2019-12-22 00:40:26 +01:00 committed by Max Moroz
parent f4429c52ce
commit 1a30a8064f
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (logfile == NULL) {
logfile = fopen("/dev/null", "w");
}
flags = * ((unsigned long *) (Data + Size - sizeof(unsigned long)));
memcpy(&flags, Data + Size - sizeof(unsigned long), sizeof(unsigned long));
mysql_init(&mysql);
mysql_options(&mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN, &opt_cleartext);
mysql_options(&mysql, MYSQL_OPT_SSL_MODE, &opt_ssl);