hwpfilter/source/grammar.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit a91ce74ddcf2ff410515b794273cf070e7d4a4ac Author: codemaestro <[email protected]> AuthorDate: Sat Oct 18 12:30:03 2025 +0530 Commit: Hossein <[email protected]> CommitDate: Wed Oct 22 18:02:54 2025 +0200 tdf#163691: Use std::copy() instead of memcpy() Change-Id: Ic1d849400c01276b8b9cf09d370f0aed635b71dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192606 Tested-by: Jenkins Reviewed-by: Hossein <[email protected]> diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx index 199aab343208..27fba248bb58 100644 --- a/hwpfilter/source/grammar.cxx +++ b/hwpfilter/source/grammar.cxx @@ -404,9 +404,9 @@ yynewstate: yystacksize = YYMAXDEPTH; yyfree_stacks = 1; yyss = static_cast<short *>(malloc (yystacksize * sizeof (*yyssp))); - memcpy (yyss, yyss1, size * sizeof (*yyssp)); + std::copy(yyss1, yyss1 + size, yyss); yyvs = static_cast<YYSTYPE *>(malloc (yystacksize * sizeof (*yyvsp))); - memcpy (yyvs, yyvs1, size * sizeof (*yyvsp)); + std::copy(yyvs1, yyvs1 + size, yyvs); // https://lists.gnu.org/archive/html/bug-bison/2001-11/msg00021.html if (yyss1 != yyssa)
