From: Adam C. Emerson Date: Thu, 26 Mar 2026 02:39:32 +0000 (-0400) Subject: cls/otp: Replace VLA with `boost::container::small_vector` X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5462945cbf73fee12ac1994ac984a3f7e1a1fefa;p=ceph.git cls/otp: Replace VLA with `boost::container::small_vector` Signed-off-by: Adam C. Emerson --- diff --git a/src/cls/otp/cls_otp.cc b/src/cls/otp/cls_otp.cc index 4dfca82556bf..3e0e8432e1c4 100644 --- a/src/cls/otp/cls_otp.cc +++ b/src/cls/otp/cls_otp.cc @@ -8,21 +8,17 @@ * */ -#include -#include +#include #include #include +#include + #include -#include "include/types.h" -#include "include/utime.h" #include "objclass/objclass.h" -#include "common/errno.h" -#include "common/Clock.h" - #include "cls/otp/cls_otp_ops.h" #include "cls/otp/cls_otp_types.h" @@ -268,8 +264,8 @@ static int write_header(cls_method_context_t hctx, const otp_header& h) static int parse_seed(const string& seed, SeedType seed_type, bufferlist *seed_bin) { size_t slen = seed.length(); - char secret[seed.length()]; - char *psecret = secret; + boost::container::small_vector secret(seed.length()); + char *psecret = secret.data(); int result; bool need_free = false;