Skip to content

Commit 10a6d9a

Browse files
committed
[C++ SDK] Fixed vulnerabilities (#20913)
1 parent 15ec329 commit 10a6d9a

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/last_commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f3a44b617baf1e14b9f933dbd9e53f3aa271d12f
1+
9949fe4a8f217461246f81be40113f8af4d91847

src/client/impl/ydb_internal/retry/retry_async.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ class TRetryWithoutSession : public TRetryContext<TClient, TAsyncStatusType> {
114114
template <typename TClient, typename TOperation, typename TAsyncStatusType = TFunctionResult<TOperation>>
115115
class TRetryWithSession : public TRetryContext<TClient, TAsyncStatusType> {
116116
using TRetryContextAsync = TRetryContext<TClient, TAsyncStatusType>;
117-
using TPtr = typename TRetryContextAsync::TPtr;
118117
using TStatusType = typename TRetryContextAsync::TStatusType;
119118
using TSession = typename TClient::TSession;
120119
using TCreateSessionSettings = typename TClient::TCreateSessionSettings;
@@ -132,7 +131,7 @@ class TRetryWithSession : public TRetryContext<TClient, TAsyncStatusType> {
132131
{}
133132

134133
void Retry() override {
135-
TPtr self(this);
134+
TIntrusivePtr<TRetryWithSession> self(this);
136135
if (!Session_) {
137136
auto settings = TCreateSessionSettings().ClientTimeout(this->Settings_.GetSessionClientTimeout_);
138137
this->Client_.GetSession(settings).Subscribe(
@@ -143,9 +142,8 @@ class TRetryWithSession : public TRetryContext<TClient, TAsyncStatusType> {
143142
return TRetryContextAsync::HandleStatusAsync(self, TStatusType(TStatus(result)));
144143
}
145144

146-
auto* myself = dynamic_cast<TRetryWithSession*>(self.Get());
147-
myself->Session_ = result.GetSession();
148-
myself->DoRunOperation(self);
145+
self->Session_ = result.GetSession();
146+
self->DoRunOperation(self);
149147
} catch (...) {
150148
return TRetryContextAsync::HandleExceptionAsync(self, std::current_exception());
151149
}

src/client/table/table.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ TIndexDescription TIndexDescription::FromProto(const TProto& proto) {
25082508
std::vector<std::string> indexColumns;
25092509
std::vector<std::string> dataColumns;
25102510
std::vector<TGlobalIndexSettings> globalIndexSettings;
2511-
std::variant<std::monostate, TKMeansTreeSettings> specializedIndexSettings;
2511+
std::variant<std::monostate, TKMeansTreeSettings> specializedIndexSettings = std::monostate{};
25122512

25132513
indexColumns.assign(proto.index_columns().begin(), proto.index_columns().end());
25142514
dataColumns.assign(proto.data_columns().begin(), proto.data_columns().end());

0 commit comments

Comments
 (0)