Skip to content

crash in iq_mam_request_older #2142

@balejk

Description

@balejk

Expected Behavior

Profanity doesn't crash.

Current Behavior

Profanity crashes (SIGSEGV) with the following stacktrace:

#0  0x0000563de34670e3 in iq_mam_request_older (win=0x7f1ab5730c20) at ../src/xmpp/iq.c:2639
#1  iq_mam_request_older (win=0x7f1ab5730c20) at ../src/xmpp/iq.c:2626
#2  0x0000563de3484efd in win_page_up (window=0x7f1ab5730c20, scroll_size=<optimized out>) at ../src/ui/window.c:703
#3  0x0000563de3490c76 in _inp_rl_win_pageup_handler (count=<optimized out>, key=<optimized out>) at ../src/ui/inputwin.c:902
#4  0x00007f1ab99bb428 in _rl_dispatch_subseq () from /lib/libreadline.so.8
#5  0x00007f1ab99bbfdc in _rl_dispatch_callback () from /lib/libreadline.so.8
#6  0x00007f1ab99d8eef in rl_callback_read_char () from /lib/libreadline.so.8
#7  0x0000563de3490f65 in inp_readline () at ../src/ui/inputwin.c:190
#8  0x0000563de345e8f3 in prof_run (log_level=<optimized out>, account_name=<optimized out>, config_file=<optimized out>, log_file=<optimized out>, theme_name=<optimized out>, commands=0x0) at ../src/profanity.c:95
#9  0x0000563de34523ac in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:150

Possible Solution

Steps to Reproduce (for bugs)

  1. Open a direct chat with someone (/msg <someone>).
  2. Press PgUp (possibly several times) to fetch more history.
  3. Observe the crash.

Context

Environment

  • Give us the version and build information output generated by profanity -v
Profanity, version 0.17.0dev
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2026 Michael Vetter <jubalh@iodoru.org>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 2.0.1)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.14.3)
GTK icons/clipboard: Enabled
GDK Pixbuf: Disabled
  • If you could not yet build profanity, mention the revision you try to build from
  • Operating System/Distribution
    Void Linux, musl-flavour
  • glib version
    2.86.1
  • libstrophe version
    0.14.0
  • Some bugs might be due to specific implementation in the server. /serversoftware example.domain can be helpful
Name    : Prosody
Version : 13.0.4
OS      : Linux

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions