SHA256
1
0
forked from pool/fetchmail
fetchmail/fetchmail-6.3.8-long_headers_segfault.patch

21 lines
652 B
Diff
Raw Normal View History

# Fixes bug (#354291)
# Fetchmail segfaulted while retrieving mail with To: header longer than 2048.
# It had to be invoked with -v -v or higher verbosity level.
--- report.c
+++ report.c
@@ -238,9 +238,13 @@
rep_ensuresize();
#if defined(VA_START)
- VA_START (args, message);
for ( ; ; )
{
+ /*
+ * args has to be initialized before every call of vsnprintf(), because
+ * vsnprintf() invokes va_arg macro and thus args is undefined after the call
+ */
+ VA_START (args, message);
n = vsnprintf (partial_message + partial_message_size_used, partial_message_size - partial_message_size_used,
message, args);