Commit e95762c1 authored by Dmitry Blinov's avatar Dmitry Blinov Committed by Esteban Blanc

pwr: prevent overlapping strcpy in wbltoh

parent 4bdf7265
...@@ -306,6 +306,9 @@ configure-command = ...@@ -306,6 +306,9 @@ configure-command =
sed -i "s#aroot=/usr/local/adm#aroot=${:aroot}#" ${:compile-dir}/build.sh sed -i "s#aroot=/usr/local/adm#aroot=${:aroot}#" ${:compile-dir}/build.sh
sed -i "s#(cross_compile)#(cross_compile) ${:rpaths} #" ${:compile-dir}/xtt/exe/wb_ge/qt/link_rule.mk sed -i "s#(cross_compile)#(cross_compile) ${:rpaths} #" ${:compile-dir}/xtt/exe/wb_ge/qt/link_rule.mk
sed -i "/chmod a+x pkg_unpack.sh/a sed -i '/USER/,\$d' pkg_unpack.sh" ${:compile-dir}/src/exp/com/src/pwr_pkg.sh sed -i "/chmod a+x pkg_unpack.sh/a sed -i '/USER/,\$d' pkg_unpack.sh" ${:compile-dir}/src/exp/com/src/pwr_pkg.sh
sed -i 's/strcpy(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etype_")\])/memmove(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etype_")\],strlen(\&ctx->rw->attr_typeref\[strlen("pwr_etype_")\])+1)/' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp
sed -i '/strcpy($/d' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp
sed -i 's/ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\])/memmove(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\], strlen(\&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\])+1)/' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp
sed -i "s#cflags := \$(cross_compile) -c#cflags := \$(cross_compile) -fsanitize=address ${:incdir} -c#" ${:compile-dir}/src/tools/bld/src/variables.mk sed -i "s#cflags := \$(cross_compile) -c#cflags := \$(cross_compile) -fsanitize=address ${:incdir} -c#" ${:compile-dir}/src/tools/bld/src/variables.mk
sed -i "s#linkflags := \$(cross_compile) #linkflags := \$(cross_compile) -fsanitize=address -llsan ${:rpaths} #" ${:compile-dir}/src/tools/bld/src/variables.mk sed -i "s#linkflags := \$(cross_compile) #linkflags := \$(cross_compile) -fsanitize=address -llsan ${:rpaths} #" ${:compile-dir}/src/tools/bld/src/variables.mk
sed -i "s#cxxflags := \$(cflags)#cxxflags := -std=gnu++11 \$(cflags)#" ${:compile-dir}/src/tools/bld/src/variables.mk sed -i "s#cxxflags := \$(cflags)#cxxflags := -std=gnu++11 \$(cflags)#" ${:compile-dir}/src/tools/bld/src/variables.mk
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment