fix(review): address PR #130 review

- proftest: declare the _mkdir_recursive loop index inside the for.
- xmpp/presence: shorten the resource-snapshot comment to one line.
- command/cmd_funcs: report the /vcard remove index error via cons_show_error.
- common: replace g_assert in g_diff_to_gsize with a log_error + return 0
  (moved out of the header into common.c); take get_random_string length as
  size_t instead of asserting non-negative.
- otr: drop the change-narrating comment on the whitespace memmove.

Refs #112
This commit is contained in:
2026-06-16 18:03:50 +03:00
committed by jabber.developer2
parent a4e6419faf
commit f16b26bd6d
6 changed files with 19 additions and 23 deletions

View File

@@ -278,9 +278,7 @@ otr_on_message_recv(const char* const barejid, const char* const resource, const
if (strstr(message, OTRL_MESSAGE_TAG_V2) && strstr(message, OTRL_MESSAGE_TAG_V1)) {
tag_length = 32;
}
// Shift the remainder of the message (including the trailing NUL)
// left over the tag, not just the next tag_length bytes — otherwise
// the tail is left in place and the body is duplicated/truncated.
// Move the rest of the message (with NUL) over the tag.
memmove(whitespace_base, whitespace_base + tag_length, strlen(whitespace_base + tag_length) + 1);
char* otr_query_message = otr_start_query();
cons_show("OTR Whitespace pattern detected. Attempting to start OTR session…");