jabber.developer
  • Joined on 2025-06-19
jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

Most of the messages will have this value as NULL. Luckily, SQLite treats them as unique values.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

It deserves at least warning level. We can't just silently not write message to log: the message might contain important information for user. The error also should be extremely rare and it should represent invalid state, so it makes sense to cons_show_error it to alert the user.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

Why not?

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

It would be better to use auto_gchar gchar* word instead of g_freeing it 2 lines below, because we would maintain consistency across the code (auto_-style), avoid risks of UAF in the future, and also match the type (g_strndup returns gchar*, not char*)

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

note: we should also clean it up its definition later

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

It should be gchar*

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

I am not sure right now, but I recall one XEP mentioning that we shouldn't trust by. Further investigation is required.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

Why though?

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

Nice catch. Feel free to close.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

Literally WET. This parts repeats one-to-one with the part above. It deserves its own method. More than that,

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

segfaults_when_empty? Is it an actual behavior*? Or is it what we try to avoid? It's either a really strange test that expects undesired behavior or poor choice of a test name

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

This case doesn't test much :) Whether tab or shift+tab, we'll get file2.txt. We need at least 3 files to make an actual test.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

We can add one more test for myuser@mydomain/user@laptop. As per RFC6122, section 2.4,

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

TODO: test with other popular messenger to ensure that this logic works correctly.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

we should set it to NULL for safety

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

We already have a similar method. TODO: understand interaction of these 2 fixes.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

TODO: test leaks here

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

We can add overflow and similar tests here.

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

How will it reflect on existing accounts? Would it be possible to have accounts with such names previously?

jabber.developer commented on pull request devs/cproof#105 2026-04-23 15:04:46 +00:00
merge/upstream-full

TODO: investigate double free/similar issues due to cleaning regardless of omemo_ctx.loaded. Likely, it's intentional, but I want to make sure. double free is worse than memleak