Skip to content

Трясцин Савелий Валерьевич#3

Closed
boboboba wants to merge 1 commit into
cppdevcourse:masterfrom
boboboba:master
Closed

Трясцин Савелий Валерьевич#3
boboboba wants to merge 1 commit into
cppdevcourse:masterfrom
boboboba:master

Conversation

@boboboba

Copy link
Copy Markdown

No description provided.

@boboboba boboboba changed the title hide-secret Трясцин Савелий Валерьевич Oct 28, 2025
Comment thread hide-secret.cpp
{
if (text == nullptr || secret == nullptr)
return;
int secretLength = strlen(secret);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Длину text тоже можно заранее проверить

Comment thread hide-secret.cpp
{
if (text[j] == '\0')
{
needEnd = true;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если заранее проверить длину text, то в needEnd не будет нужды

Comment thread hide-secret.cpp
{
break;
}
text[i] = '\x01';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вам, пожалуй, стоит перед работой функции посмотреть, нет ли в ней \x01. И если есть, прекращать работу.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно так же попробовать организовать поиск неиспользуемого символа вместо \x01

@boboboba boboboba closed this by deleting the head repository Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants