server icon indicating copy to clipboard operation
server copied to clipboard

Minimize unsafe C functions usage - replace strcat() and strcpy() - continued

Open robinnewhouse opened this issue 1 year ago • 7 comments

Description

567b681 introduced safe_strcpy() to minimize the use of C with potentially unsafe memory overflow with strcpy() whose use is discouraged. Replace instances of strcpy() with safe_strcpy() where possible, limited here to files in the sql/ directory.

How can this PR be tested?

All passing MTR tests still pass. Tested manually and in CI.

Basing the PR against the correct MariaDB version

  • [x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced

PR quality check

Copyright

All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.

robinnewhouse avatar Mar 02 '23 18:03 robinnewhouse

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Mar 02 '23 18:03 CLAassistant

Marked as WIP. Investigating failing MTR tests.

robinnewhouse avatar Mar 06 '23 20:03 robinnewhouse

@arun-esh Would you like to review this? It is somewhat similar to your #2573.

ottok avatar Apr 09 '23 22:04 ottok

Removed changes that were the cause of failing tests. Could this be reviewed? cc @arun-esh

robinnewhouse avatar May 02 '23 01:05 robinnewhouse

Is this ok to push to 10.4 or would you like me to rebase to 10.5?

robinnewhouse avatar Apr 16 '24 22:04 robinnewhouse

I'd suggest 10.5, just to be on the safe side. We're doing the very last 10.4 within a couple of weeks.

vuvova avatar Apr 17 '24 08:04 vuvova

@vuvova Rebased to 10.5 @cvicentiu Updated indentation.

robinnewhouse avatar Apr 17 '24 19:04 robinnewhouse