From 19975759f118013dc45512c2ff12f6728670fe1b Mon Sep 17 00:00:00 2001 From: shenchai <383903691@qq.com> Date: Mon, 7 Jun 2021 18:17:43 +0800 Subject: [PATCH] fix memset to '0' for zerofill --- src/common/ob_obj_cast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ob_obj_cast.cpp b/src/common/ob_obj_cast.cpp index 31d2f59..253e939 100644 --- a/src/common/ob_obj_cast.cpp +++ b/src/common/ob_obj_cast.cpp @@ -107,7 +107,7 @@ static int copy_string(const ObObjCastParams ¶ms, } else { int64_t zf = params.zf_info_->max_length_ - len; if (zf > 0) { - MEMSET(buf, 0, zf); + MEMSET(buf, '0', zf); MEMCPY(buf + zf, str, len); len = str_len; // set string length } else { -- GitLab