Skip to content

Commit

Permalink
heap-buffer-overflow in mariadb-backup
Browse files Browse the repository at this point in the history
write of NULL ptr after the end of the allocated buffer
  • Loading branch information
vuvova committed Jan 9, 2025
1 parent 90bd638 commit 9ddecc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extra/mariabackup/encryption_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ void encryption_plugin_prepare_init(int argc, char **argv)
opt_plugin_dir[FN_REFLEN - 1] = '\0';
}

char **new_argv = new char *[argc + 1];
char **new_argv = new char *[argc + 2];
new_argv[0] = XTRABACKUP_EXE;
memcpy(&new_argv[1], argv, argc*sizeof(char *));
new_argv[argc+1]= 0;

encryption_plugin_init(argc+1, new_argv);

Expand Down

0 comments on commit 9ddecc2

Please sign in to comment.