Hello community,

here is the log from the commit of package libetpan for openSUSE:Factory 
checked in at 2020-08-17 12:05:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libetpan (Old)
 and      /work/SRC/openSUSE:Factory/.libetpan.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libetpan"

Mon Aug 17 12:05:45 2020 rev:28 rq:826908 version:1.9.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/libetpan/libetpan.changes        2019-11-26 
16:51:14.924273512 +0100
+++ /work/SRC/openSUSE:Factory/.libetpan.new.3399/libetpan.changes      
2020-08-17 12:06:11.314721288 +0200
@@ -1,0 +2,7 @@
+Sat Aug 15 23:20:24 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 1.9.4 (bsc#1174579, CVE-2020-15953):
+  * Bugfixes on QUOTA
+  * Varios warning fixes & build fixes 
+
+-------------------------------------------------------------------

Old:
----
  1.9.3.tar.gz

New:
----
  1.9.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libetpan.spec ++++++
--- /var/tmp/diff_new_pack.7132dR/_old  2020-08-17 12:06:12.482721939 +0200
+++ /var/tmp/diff_new_pack.7132dR/_new  2020-08-17 12:06:12.486721940 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libetpan
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,13 @@
 
 
 %define sover 20
-
 Name:           libetpan
-Version:        1.9.3
+Version:        1.9.4
 Release:        0
 Summary:        Mail Handling Library
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
-Url:            http://www.etpan.org/libetpan.html
+URL:            https://www.etpan.org/libetpan.html
 Source0:        
https://github.com/dinhviethoa/libetpan/archive/%{version}.tar.gz
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -34,7 +33,6 @@
 BuildRequires:  gcc-c++
 BuildRequires:  libtool
 BuildRequires:  openssl-devel
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 libEtPan is a mail purpose library. It will be used for low-level mail
@@ -75,7 +73,7 @@
 touch README INSTALL COPYING 
 autoreconf -fi
 %configure --disable-static
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install
@@ -86,16 +84,14 @@
 %postun -n libetpan%{sover} -p /sbin/ldconfig
 
 %files -n libetpan%{sover}
-%defattr(-, root, root)
 %doc ChangeLog NEWS doc/README*
 %{_libdir}/libetpan.so.%{sover}*
 
 %files -n libetpan-devel
-%defattr(-, root, root)
 %doc doc/API* doc/DOCUMENTATION
-%{_bindir}/libetpan-config
 %{_includedir}/libetpan/
 %{_includedir}/libetpan.h
 %{_libdir}/libetpan.so
+%{_libdir}/pkgconfig/libetpan.pc
 
 %changelog

++++++ 1.9.3.tar.gz -> 1.9.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/Makefile.am 
new/libetpan-1.9.4/Makefile.am
--- old/libetpan-1.9.3/Makefile.am      2019-01-22 20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/Makefile.am      2019-11-01 18:58:50.000000000 +0100
@@ -31,15 +31,13 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-EXTRA_DIST = libetpan-config.in libetpan-config.h.in COPYRIGHT
-
-bin_SCRIPTS = libetpan-config
+EXTRA_DIST = libetpan.pc.in libetpan-config.h.in COPYRIGHT
 
 # The file stamp-prepare is generated in the top build directory by
 # rules defined in rules.mk.
 CLEANFILES = stamp-prepare libetpan-config.h 
 
-DISTCLEANFILES = libetpan-config
+DISTCLEANFILES = libetpan.pc
 
 SUBDIRS = build-windows include src tests doc
 
@@ -47,6 +45,9 @@
 
 etpaninclude_HEADERS = libetpan-config.h
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libetpan.pc
+
 # We need to build the header file before the link farm for VPATH
 # builds.
 $(top_builddir)/stamp-prepare: libetpan-config.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/README.md new/libetpan-1.9.4/README.md
--- old/libetpan-1.9.3/README.md        2019-01-22 20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/README.md        2019-11-01 18:58:50.000000000 +0100
@@ -34,8 +34,8 @@
 
 ### How to link with it
 
-    $ gcc -c -o sample.o sample.c `libetpan-config --cflags`
-    $ gcc -o sample sample.o `libetpan-config --libs`
+    $ gcc -c -o sample.o sample.c `pkg-config libetpan --cflags`
+    $ gcc -o sample sample.o `pkg-config libetpan --libs`
 
 ### Mac / iOS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/configure.ac 
new/libetpan-1.9.4/configure.ac
--- old/libetpan-1.9.3/configure.ac     2019-01-22 20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/configure.ac     2019-11-01 18:58:50.000000000 +0100
@@ -3,8 +3,8 @@
 
 m4_define([maj_version], [1])
 m4_define([min_version], [9])
-m4_define([mic_version], [3])
-m4_define([api_current], [24])
+m4_define([mic_version], [4])
+m4_define([api_current], [25])
 m4_define([api_revision], [0])
 m4_define([api_compatibility], [20])
 dnl API version
@@ -77,6 +77,9 @@
 BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_REVISION}"
 AC_SUBST(BUILD_FILEVERSION)
 
+dnl Require pkg-config
+m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal(["Missing pkg-config macros"])])
+PKG_PROG_PKG_CONFIG
 
 # Architecture specific.
 have_w32_system=no
@@ -755,8 +758,7 @@
 
 # Further checks.
 
-AC_CONFIG_FILES(libetpan-config
-               Makefile
+AC_CONFIG_FILES(Makefile
                build-windows/Makefile
                 include/Makefile
                 src/Makefile
@@ -794,7 +796,8 @@
                src/engine/Makefile
                src/versioninfo.rc
                doc/Makefile
-               tests/Makefile)
+               tests/Makefile
+               libetpan.pc)
 
 # We collect all files which could potentially install public header
 # files via HEADERS.  Updating any of these files will trigger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/libetpan-config.in 
new/libetpan-1.9.4/libetpan-config.in
--- old/libetpan-1.9.3/libetpan-config.in       2019-01-22 20:40:22.000000000 
+0100
+++ new/libetpan-1.9.4/libetpan-config.in       1970-01-01 01:00:00.000000000 
+0100
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-exec_prefix_set=no
-
-usage="\
-Usage: libetpan-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] 
[--libs] [--cflags]"
-
-if test $# -eq 0; then
-      echo "${usage}" 1>&2
-      exit 1
-fi
-
-while test $# -gt 0; do
-  case "$1" in
-  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  case $1 in
-    --prefix=*)
-      prefix=$optarg
-      if test $exec_prefix_set = no ; then
-        exec_prefix=$optarg
-      fi
-      ;;
-    --prefix)
-      echo $prefix
-      ;;
-    --exec-prefix=*)
-      exec_prefix=$optarg
-      exec_prefix_set=yes
-      ;;
-    --exec-prefix)
-      echo $exec_prefix
-      ;;
-    --version)
-      echo @VERSION@
-      ;;
-    --cflags)
-      if test "@includedir@" = "/usr/include" ; then
-          includedir=""
-      else
-         includedir=-I@includedir@
-      fi
-      echo $includedir
-      ;;
-    --libs)
-      libdir=-L@libdir@
-      echo $libdir -letpan@LIBSUFFIX@ @LDFLAGS@ @SSLLIBS@ @GNUTLSLIB@ 
@LIBICONV@ @DBLIB@ @LIBS@ @SASLLIBS@
-      ;;
-    *)
-      echo "${usage}" 1>&2
-      exit 1
-      ;;
-  esac
-  shift
-done
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/libetpan.pc.in 
new/libetpan-1.9.4/libetpan.pc.in
--- old/libetpan-1.9.3/libetpan.pc.in   1970-01-01 01:00:00.000000000 +0100
+++ new/libetpan-1.9.4/libetpan.pc.in   2019-11-01 18:58:50.000000000 +0100
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+
+Name: libetpan
+Description: Libetpan C library.
+Version: @VERSION@
+Libs: -L${libdir} -letpan@LIBSUFFIX@ @LDFLAGS@ @SSLLIBS@ @GNUTLSLIB@ 
@LIBICONV@ @DBLIB@ @LIBS@ @SASLLIBS@
+Cflags: -I${includedir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/data-types/mailstream_ssl.c 
new/libetpan-1.9.4/src/data-types/mailstream_ssl.c
--- old/libetpan-1.9.3/src/data-types/mailstream_ssl.c  2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/data-types/mailstream_ssl.c  2019-11-01 
18:58:50.000000000 +0100
@@ -636,7 +636,7 @@
                timeout_value = mailstream_network_delay.tv_sec * 1000 + 
mailstream_network_delay.tv_usec / 1000;
   }
   else {
-               timeout_value = timeout;
+               timeout_value = timeout * 1000;
   }
 #if GNUTLS_VERSION_NUMBER >= 0x030100
        gnutls_handshake_set_timeout(session, timeout_value);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/low-level/imap/clientid.c 
new/libetpan-1.9.4/src/low-level/imap/clientid.c
--- old/libetpan-1.9.3/src/low-level/imap/clientid.c    2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/imap/clientid.c    2019-11-01 
18:58:50.000000000 +0100
@@ -33,6 +33,9 @@
 #      include <config.h>
 #endif
 
+#include <stddef.h>
+#include <stdlib.h>
+
 #include "mailimap_sender.h"
 #include "clientid_sender.h"
 #include "clientid.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/low-level/imap/mailimap.c 
new/libetpan-1.9.4/src/low-level/imap/mailimap.c
--- old/libetpan-1.9.3/src/low-level/imap/mailimap.c    2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/imap/mailimap.c    2019-11-01 
18:58:50.000000000 +0100
@@ -749,7 +749,13 @@
   }
 
   r = mailimap_parse_response(session, &response);
-  if (r != MAILIMAP_NO_ERROR) {
+  if (r == MAILIMAP_ERROR_STREAM) {
+    // the response is expected to be MAILIMAP_ERROR_STREAM
+    // because the server responds with BYE so the stream
+    // is immediately closed
+    res = MAILIMAP_NO_ERROR;
+    goto close;
+  } else if (r != MAILIMAP_NO_ERROR) {
     res = r;
     goto close;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/low-level/imap/mailimap_parser.c 
new/libetpan-1.9.4/src/low-level/imap/mailimap_parser.c
--- old/libetpan-1.9.3/src/low-level/imap/mailimap_parser.c     2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/imap/mailimap_parser.c     2019-11-01 
18:58:50.000000000 +0100
@@ -4860,6 +4860,7 @@
   message_id = NULL;
   first_string = NULL;
   second_string = NULL;
+  res = MAILIMAP_ERROR_PARSE;
 
   cur_token = * indx;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/low-level/imap/quota.h 
new/libetpan-1.9.4/src/low-level/imap/quota.h
--- old/libetpan-1.9.3/src/low-level/imap/quota.h       2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/imap/quota.h       2019-11-01 
18:58:50.000000000 +0100
@@ -52,6 +52,9 @@
     const char * list_mb,
     struct mailimap_quota_complete_data ** result);
 
+LIBETPAN_EXPORT
+int mailimap_has_quota(mailimap * session);
+
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/low-level/imap/quota_parser.c 
new/libetpan-1.9.4/src/low-level/imap/quota_parser.c
--- old/libetpan-1.9.3/src/low-level/imap/quota_parser.c        2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/imap/quota_parser.c        2019-11-01 
18:58:50.000000000 +0100
@@ -103,7 +103,7 @@
 }
 
 static int
-mailimap_quota_quota_list_nonempty_parse(mailstream * fd, MMAPString * buffer,
+mailimap_quota_quota_list_nonempty_parse(mailstream * fd, MMAPString * buffer, 
struct mailimap_parser_context * parser_ctx,
     size_t * indx, clist ** result,
     size_t progr_rate, progress_function * progr_fun)
 {
@@ -114,13 +114,13 @@
 
   cur_token = * indx;
 
-  r = mailimap_oparenth_parse(fd, buffer, NULL, &cur_token);
+  r = mailimap_oparenth_parse(fd, buffer, parser_ctx, &cur_token);
   if (r != MAILIMAP_NO_ERROR) {
     res = r;
     goto err;
   }
 
-  r = mailimap_struct_spaced_list_parse(fd, buffer, NULL,
+  r = mailimap_struct_spaced_list_parse(fd, buffer, parser_ctx,
       &cur_token, &quota_resource_list,
       &mailimap_quota_quota_resource_parse,
       (mailimap_struct_destructor *)
@@ -131,7 +131,7 @@
     goto err;
   }
 
-  r = mailimap_cparenth_parse(fd, buffer, NULL, &cur_token);
+  r = mailimap_cparenth_parse(fd, buffer, parser_ctx, &cur_token);
   if (r != MAILIMAP_NO_ERROR) {
     res = r;
     goto quota_list_free;
@@ -151,7 +151,7 @@
 }
 
 static int
-mailimap_quota_quota_list_empty_parse(mailstream * fd, MMAPString * buffer,
+mailimap_quota_quota_list_empty_parse(mailstream * fd, MMAPString * buffer, 
struct mailimap_parser_context * parser_ctx,
     size_t * indx, clist ** result,
     size_t progr_rate, progress_function * progr_fun)
 {
@@ -161,12 +161,12 @@
 
   cur_token = * indx;
 
-  r = mailimap_oparenth_parse(fd, buffer, NULL, &cur_token);
+  r = mailimap_oparenth_parse(fd, buffer, parser_ctx, &cur_token);
   if (r != MAILIMAP_NO_ERROR) {
     return r;
   }
 
-  r = mailimap_cparenth_parse(fd, buffer, NULL, &cur_token);
+  r = mailimap_cparenth_parse(fd, buffer, parser_ctx, &cur_token);
   if (r != MAILIMAP_NO_ERROR) {
     return r;
   }
@@ -183,24 +183,24 @@
 }
 
 static int
-mailimap_quota_quota_list_parse(mailstream * fd, MMAPString * buffer,
+mailimap_quota_quota_list_parse(mailstream * fd, MMAPString * buffer, struct 
mailimap_parser_context * parser_ctx,
     size_t * indx, clist ** result,
     size_t progr_rate, progress_function * progr_fun)
 {
   int r;
 
-  r = mailimap_quota_quota_list_empty_parse(fd, buffer, indx, result,
+  r = mailimap_quota_quota_list_empty_parse(fd, buffer, parser_ctx, indx, 
result,
       progr_rate, progr_fun);
   if (r == MAILIMAP_NO_ERROR) {
     return r;
   }
 
-  return mailimap_quota_quota_list_nonempty_parse(fd, buffer, indx, result,
+  return mailimap_quota_quota_list_nonempty_parse(fd, buffer, parser_ctx, 
indx, result,
       progr_rate, progr_fun);
 }
 
 static int
-mailimap_quota_quota_response_parse(mailstream * fd, MMAPString * buffer,
+mailimap_quota_quota_response_parse(mailstream * fd, MMAPString * buffer, 
struct mailimap_parser_context * parser_ctx,
     size_t * indx, struct mailimap_quota_quota_data ** result,
     size_t progr_rate, progress_function * progr_fun)
 {
@@ -226,7 +226,7 @@
     goto err;
   }
 
-  r = mailimap_astring_parse(fd, buffer, NULL, &cur_token, &quotaroot,
+  r = mailimap_astring_parse(fd, buffer, parser_ctx, &cur_token, &quotaroot,
           progr_rate, progr_fun);
   if (r != MAILIMAP_NO_ERROR) {
     res = r;
@@ -239,7 +239,7 @@
     goto quotaroot_free;
   }
 
-  r = mailimap_quota_quota_list_parse(fd, buffer, &cur_token,
+  r = mailimap_quota_quota_list_parse(fd, buffer, parser_ctx, &cur_token,
       &quota_list, progr_rate, progr_fun);
   if (r != MAILIMAP_NO_ERROR) {
     res = r;
@@ -268,7 +268,7 @@
 }
 
 static int
-mailimap_quota_quotaroot_response_parse(mailstream * fd, MMAPString * buffer,
+mailimap_quota_quotaroot_response_parse(mailstream * fd, MMAPString * buffer, 
struct mailimap_parser_context * parser_ctx,
     size_t * indx, struct mailimap_quota_quotaroot_data ** result,
     size_t progr_rate, progress_function * progr_fun)
 {
@@ -295,7 +295,7 @@
     goto err;
   }
 
-  r = mailimap_mailbox_parse(fd, buffer, NULL, &cur_token, &mailbox,
+  r = mailimap_mailbox_parse(fd, buffer, parser_ctx, &cur_token, &mailbox,
           progr_rate, progr_fun);
   if (r != MAILIMAP_NO_ERROR) {
     res = r;
@@ -317,7 +317,7 @@
       goto quotaroot_list_free;
     }
 
-    r = mailimap_astring_parse(fd, buffer, NULL, &cur_token, &quotaroot,
+    r = mailimap_astring_parse(fd, buffer, parser_ctx, &cur_token, &quotaroot,
         progr_rate, progr_fun);
     if (r != MAILIMAP_NO_ERROR) {
       res = r;
@@ -386,7 +386,7 @@
   switch (calling_parser)
   {
     case MAILIMAP_EXTENDED_PARSER_MAILBOX_DATA:
-      r = mailimap_quota_quota_response_parse(fd, buffer, indx,
+      r = mailimap_quota_quota_response_parse(fd, buffer, parser_ctx, indx,
         &quota_data, progr_rate, progr_fun);
       if (r == MAILIMAP_NO_ERROR) {
        type = MAILIMAP_QUOTA_TYPE_QUOTA_DATA;
@@ -394,7 +394,7 @@
       }
 
       if (r == MAILIMAP_ERROR_PARSE) {
-       r = mailimap_quota_quotaroot_response_parse(fd, buffer, indx,
+       r = mailimap_quota_quotaroot_response_parse(fd, buffer, parser_ctx, 
indx,
           &quotaroot_data, progr_rate, progr_fun);
         if (r == MAILIMAP_NO_ERROR) {
           type = MAILIMAP_QUOTA_TYPE_QUOTAROOT_DATA;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libetpan-1.9.3/src/low-level/mime/mailmime_decode.c 
new/libetpan-1.9.4/src/low-level/mime/mailmime_decode.c
--- old/libetpan-1.9.3/src/low-level/mime/mailmime_decode.c     2019-01-22 
20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/mime/mailmime_decode.c     2019-11-01 
18:58:50.000000000 +0100
@@ -407,6 +407,7 @@
 
   cur_token = * indx;
 
+  text = NULL;
   lookfwd_charset = NULL;
   missing_closing_quote = 0;
   has_fwd = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libetpan-1.9.3/src/low-level/mime/mailmime_write_generic.c 
new/libetpan-1.9.4/src/low-level/mime/mailmime_write_generic.c
--- old/libetpan-1.9.3/src/low-level/mime/mailmime_write_generic.c      
2019-01-22 20:40:22.000000000 +0100
+++ new/libetpan-1.9.4/src/low-level/mime/mailmime_write_generic.c      
2019-11-01 18:58:50.000000000 +0100
@@ -81,6 +81,9 @@
 static int mailmime_encoding_write_driver(int (* do_write)(void *, const char 
*, size_t), void * data, int * col,
                                   struct mailmime_mechanism * encoding);
 
+static int mailmime_location_write_driver(int (* do_write)(void *, const char 
*, size_t), void *data, int *col,
+                                   char *location);
+
 static int mailmime_language_write_driver(int (* do_write)(void *, const char 
*, size_t), void * data, int * col,
                                   struct mailmime_language * language);
 
@@ -169,6 +172,10 @@
     r = mailmime_language_write_driver(do_write, data, col, 
field->fld_data.fld_language);
     break;
 
+  case MAILMIME_FIELD_LOCATION:
+    r = mailmime_location_write_driver(do_write, data, col, 
field->fld_data.fld_location);
+    break;
+
   default:
     r = MAILIMF_ERROR_INVAL;
     break;
@@ -310,6 +317,33 @@
   return MAILIMF_NO_ERROR;
 }
 
+static int mailmime_location_write_driver(int (* do_write)(void *, const char 
*, size_t), void *data, int *col,
+                                   char *location)
+{
+  int r;
+  int len = strlen(location);
+
+  r = mailimf_string_write_driver(do_write, data, col, "Content-Location: ", 
18);
+  if (r != MAILIMF_NO_ERROR)
+    return r;
+
+  if (*col > 1 && *col + len > MAX_MAIL_COL) {
+    r = mailimf_string_write_driver(do_write, data, col, "\r\n ", 3);
+    if (r != MAILIMF_NO_ERROR)
+      return r;
+  }
+
+  r = mailimf_string_write_driver(do_write, data, col, location, len);
+  if (r != MAILIMF_NO_ERROR)
+    return r;
+
+  r = mailimf_string_write_driver(do_write, data, col, "\r\n", 2);
+  if (r != MAILIMF_NO_ERROR)
+    return r;
+
+  return MAILIMF_NO_ERROR;
+}
+
 static int mailmime_language_write_driver(int (* do_write)(void *, const char 
*, size_t), void * data, int * col,
                                   struct mailmime_language * language)
 {


Reply via email to