| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling with `CFLAGS="-O2 -fexceptions -Wp,-D_FORTIFY_SOURCE=2"`, as
done per default when creating an AUR package e.g. via `makepkg`, this
error is produced.
Refactor `stanza_create_mam_iq()` in order to fix said warning-turned-into-
an-error.
Edit by jubalh:
I still think the error message is a false positive. But this commit improves the
code a lot.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`MB_CUR_MAX` looks like a macro, but it's a function call and therefore
creates a VLA. We don't want that.
Also this array being uninitialized created the following Valgrind error
```
==503529== Conditional jump or move depends on uninitialised value(s)
==503529== at 0x619F15E: waddnstr (lib_addstr.c:67)
==503529== by 0x1929B7: _inp_write (inputwin.c:353)
==503529== by 0x1937D5: _inp_redisplay (inputwin.c:619)
==503529== by 0x61511B1: rl_forced_update_display (display.c:2693)
==503529== by 0x193F9D: _inp_rl_send_to_editor (inputwin.c:957)
==503529== by 0x614642F: _rl_dispatch_subseq (readline.c:916)
==503529== by 0x6146C85: _rl_dispatch_callback (readline.c:823)
==503529== by 0x616739F: rl_callback_read_char (callback.c:241)
==503529== by 0x1923DB: inp_readline (inputwin.c:188)
==503529== by 0x149860: prof_run (profanity.c:117)
==503529== by 0x2283E8: main (main.c:186)
==503529== Uninitialised value was created by a stack allocation
==503529== at 0x1928B1: _inp_write (inputwin.c:334)
```
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
| |
|
|
|
|
|
| |
The macro is effective on OpenBSD and basically a no op on other platforms.
Use it for one existing and the other known debug statements.
|
|
|
|
|
|
| |
This also fixes memory leaks in `_omemo_autocomplete()`.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
| |
Drawback is that we can't check the exitcode anymore.
But we were unsure why/when we need this, see:
https://github.com/profanity-im/profanity/pull/1760/files#r980868708
Fixes https://github.com/profanity-im/profanity/issues/1759
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We can use strchr() here.
|
| |
|
|
|
|
|
|
| |
This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2.
Sorting the includes creates some problems.
|
|
|
|
| |
Regards https://github.com/profanity-im/profanity/issues/1396
|
|
|
|
| |
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
|
| |
|
|
|
|
| |
Follow up for a6fa8e8e0d6b86c669ac2fb2b7be44812604c21f
|
|
|
|
|
|
| |
So we can use it somewhere else too.
Regards https://github.com/profanity-im/profanity/issues/1261
|
| |
|
|
|
|
|
| |
Move the code that creates a random string into it's own function
+get_random_string().
|
| |
|
|\
| |
| | |
Get rid of p_sha1 dependency
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move `p_sha1_hash()` from `common.c` to `xmpp/stanza.c` as it is only
used in this file and now depends on libstrophe so xmpp is a better
namespace folder.
Renaming it as `_stanza_create_sha1_hash()`. And making static since
only used here.
The function cannot be tested in the unit tests anymore.
Once functional tests are working again we should write a test for the
sha1 functionality.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
create_unique_id() was changed to use UUIDs instead of a counter in the
last commit. Since now it depends on connection_create_uuid() which is
in the xmpp subfolder the function should also be moved there.
Renamed it to connection_create_stanza_id() and moved it to
src/xmpp/connection.c.
Discussion happened in https://github.com/boothj5/profanity/pull/1010
|
|
|
|
|
|
|
|
|
|
|
|
| |
Message IDs should be unique so they can be used by XEPs like delivery receipts, chat markers, message correction.
So far it used a counter so restarting profanity will cause the counter
to be 0 again.
Let's rather use an UUID since we have such a function in the
xmpp/xmpp.h already.
Closes https://github.com/boothj5/profanity/issues/998
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The same code was used on two different occasions. I put it into a
function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/tools/history.c
src/tools/history.h
|