From: Timo Sirainen Date: Tue, 24 Mar 2026 10:02:00 +0000 (+0200) Subject: [PATCH 1/2] dsync: Avoid potentially excessive data stack growth for mailbox attribut... X-Git-Tag: archive/raspbian/1%2.4.1+dfsg1-6+rpi1+deb13u7^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ece27d4de4780710c0b6dec1bae0849471bfd31f;p=dovecot.git [PATCH 1/2] dsync: Avoid potentially excessive data stack growth for mailbox attribute sending The attribute value can be large. Gbp-Pq: Name 0001-dsync-Avoid-potentially-excessive-data-stack-growth-.patch --- diff --git a/src/doveadm/dsync/dsync-ibc-stream.c b/src/doveadm/dsync/dsync-ibc-stream.c index 472d1fc..0b30382 100644 --- a/src/doveadm/dsync/dsync-ibc-stream.c +++ b/src/doveadm/dsync/dsync-ibc-stream.c @@ -1492,12 +1492,12 @@ dsync_ibc_stream_send_mailbox_attribute(struct dsync_ibc *_ibc, { struct dsync_ibc_stream *ibc = (struct dsync_ibc_stream *)_ibc; struct dsync_serializer_encoder *encoder; - string_t *str = t_str_new(128); char type[2]; if (ibc->minor_version < DSYNC_PROTOCOL_MINOR_HAVE_ATTRIBUTES) return; + string_t *str = str_new(default_pool, 128); str_append_c(str, items[ITEM_MAILBOX_ATTRIBUTE].chr); encoder = dsync_ibc_send_encode_begin(ibc, ITEM_MAILBOX_ATTRIBUTE); @@ -1538,6 +1538,7 @@ dsync_ibc_stream_send_mailbox_attribute(struct dsync_ibc *_ibc, i_stream_ref(ibc->value_output); (void)dsync_ibc_stream_send_value_stream(ibc); } + str_free(&str); } static enum dsync_ibc_recv_ret