From 71016036a4968abf7b055e779d390e8c8beab738 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 19 Feb 2001 21:48:38 +0000 Subject: Fix a fatal error in Dave Zarzycki's plugin parser. svn path=/trunk/; revision=3125 --- NEWS | 2 ++ socket.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9633db85..97e97453 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ (The `lines' figures total .c, .h, .l, and .y files under version control.) * `preauth' option changed back to `auth' +* IMAP code now bails out if the server forces the mailbox read-only. +* Fixed a core dump in Dave Zarzycki's new plugin code. fetchmail-5.6.7 (Mon Feb 19 12:31:03 EST 2001), 20082 lines: diff --git a/socket.c b/socket.c index 64a1d711..7d1a78e2 100644 --- a/socket.c +++ b/socket.c @@ -102,12 +102,12 @@ char *const *parse_plugin(const char *plugin, const char *host, const char *serv while (plugin_copy_offset < plugin_copy_len) { if ((plugin[plugin_offset] == '%') && (plugin[plugin_offset + 1] == 'h')) - { strcat(plugin_copy + plugin_copy_offset, host); + { strcpy(plugin_copy + plugin_copy_offset, host); plugin_offset += 2; plugin_copy_offset += host_len; } else if ((plugin[plugin_offset] == '%') && (plugin[plugin_offset + 1] == 'p')) - { strcat(plugin_copy + plugin_copy_offset, service); + { strcpy(plugin_copy + plugin_copy_offset, service); plugin_offset += 2; plugin_copy_offset += service_len; } -- cgit v1.2.3