Bug #1257
Segfault in string handling
100%
Description
Quasselclient for linux v0.9.1 (Protocol v10) crashed when trying to view a bitlbee jabber channel with very long messages.
Reproduction:
Write a very long message to a buddy on bitlbee. To reproduce the crash, try to open the channel of that buddy.
Output on the commandline (see attached file):
"String too long to be styled: [long $String here]
Associated revisions
Don't crash on very long inputs
Because our style engine uses 16 bit indexes, strings can only be
styled if they're shorter than 2^16 characters. We do check for this
in the style engine and refuse to style strings that are longer.
However, just returning an default-constructed StyledString() is wrong,
because other places rely on there being at least one format and the
plaintext be initialized. So the proper way of handling this is just
using the baseFormat and the full string as plaintext instead of an
empty StyledString.
Fixes #1257.
History
#1 Updated by Anonymous almost 11 years ago
- File crashlog crashlog added
- Status changed from New to Confirmed
- Priority changed from High to Normal
Easily reproducable, even by pasting the message in quassel itself (did take a while to crash the first time).
#2 Updated by Anonymous over 10 years ago
- Status changed from Confirmed to Resolved
- % Done changed from 0 to 100
Applied in changeset quassel|commit:a6c419727506abd19f41d8de6e02de015a7aa8e5.
Don't crash on very long inputs
Because our style engine uses 16 bit indexes, strings can only be
styled if they're shorter than 2^16 characters. We do check for this
in the style engine and refuse to style strings that are longer.
However, just returning an default-constructed StyledString() is wrong,
because other places rely on there being at least one format and the
plaintext be initialized. So the proper way of handling this is just
using the baseFormat and the full string as plaintext instead of an
empty StyledString.
Fixes #1257.