Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package leafnode for openSUSE:Factory checked in at 2023-03-04 22:43:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/leafnode (Old) and /work/SRC/openSUSE:Factory/.leafnode.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "leafnode" Sat Mar 4 22:43:55 2023 rev:19 rq:1069406 version:2.0.0+git.1677927696.44d2783 Changes: -------- --- /work/SRC/openSUSE:Factory/leafnode/leafnode.changes 2022-05-17 17:24:54.383196698 +0200 +++ /work/SRC/openSUSE:Factory/.leafnode.new.31432/leafnode.changes 2023-03-04 22:44:31.148128054 +0100 @@ -1,0 +2,17 @@ +Sat Mar 04 12:29:52 UTC 2023 - [email protected] + +- Update to version 2.0.0+git.1677927696.44d2783: + * configure.ac: add PCRE to LIBS not LDCONFIG + * Make C++17 compatible. + * Add a comment about rnews. + * Plug memory leak. + * Update NEWS and ChangeLog. + * store: cope with folded headers. + * Bump copyright. + * split_serverarg(): initialize char *s[3]. + * log_fclose: fix use-after-free warning + * ugid.h: fix Linux features.h compiler warning + * configure.ac: update and bump version + * newsq: Plug memory leaks. + +------------------------------------------------------------------- Old: ---- leafnode-2.0.0+git.1625851959.1275fbe.tar.xz New: ---- leafnode-2.0.0+git.1677927696.44d2783.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ leafnode.spec ++++++ --- /var/tmp/diff_new_pack.TQrRxF/_old 2023-03-04 22:44:31.620130323 +0100 +++ /var/tmp/diff_new_pack.TQrRxF/_new 2023-03-04 22:44:31.624130343 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ %define admin_group newsadmin %define upname leafnode Name: %{upname} -Version: 2.0.0+git.1625851959.1275fbe +Version: 2.0.0+git.1677927696.44d2783 Release: 0 Summary: Leaf site NNTP server License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.TQrRxF/_old 2023-03-04 22:44:31.684130631 +0100 +++ /var/tmp/diff_new_pack.TQrRxF/_new 2023-03-04 22:44:31.688130650 +0100 @@ -3,6 +3,6 @@ <param name="url">https://gitlab.com/leafnode-2/leafnode-2/</param> <param name="changesrevision">85d54cad829ded8cb566631933467f70fd5b9a4e</param></service><service name="tar_scm"> <param name="url">https://gitlab.com/leafnode-2/leafnode-2.git/</param> - <param name="changesrevision">1275fbe57ffaaf880d2b0dbdc27b4ebcea6c3596</param></service></servicedata> + <param name="changesrevision">44d278361adb3c1ac313ccdfd30e71b001fbe012</param></service></servicedata> (No newline at EOF) ++++++ leafnode-2.0.0+git.1625851959.1275fbe.tar.xz -> leafnode-2.0.0+git.1677927696.44d2783.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/ChangeLog new/leafnode-2.0.0+git.1677927696.44d2783/ChangeLog --- old/leafnode-2.0.0+git.1625851959.1275fbe/ChangeLog 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/ChangeLog 2023-03-04 12:01:36.000000000 +0100 @@ -1,3 +1,212 @@ +2023-03-03 Matthias Andree <[email protected]> + + * store: cope with folded headers. + MatÄj Cepl reported that leafnode would not properly store + articles where the Message-ID: + <[email protected]> + + via the mailing list. This caused these errors for him: + + store: Message-ID header missing or malformatted + Could not store /var/spool/news/in.coming/1234-1677599876-1: + "malformatted", moving to /var/spool/news/failed.postings/ + + Fix this by reading folded header lines in its entirety; + to this end, add a mastr_getfoldedln local (static) function. + + M store.c + + * Bump copyright. + + M leafnode.8.in + + * split_serverarg(): initialize char *s[3]. + + M fetchnews.c + + * log_fclose: fix use-after-free warning + This was harmless, but the FILE pointer value isn't terribly useful anyways. Drop it. + + M log_fclose.c + + * ugid.h: fix Linux features.h compiler warning + + M ugid.h + + * configure.ac: update and bump version + adds AC_USE_SYSTEM_EXTENSIONS + requires autoconf 2.71 + + M configure.ac + + * newsq: Plug memory leaks. + + M newsq.c + +2021-07-09 Matthias Andree <[email protected]> + + * Bump version and update NEWS. + + M NEWS + M configure.ac + + * Ship MatÄj Cepl's systemd files, and refer to them + + M Makefile.am + M README.html + +2021-07-09 MatÄj Cepl <[email protected]> + + * Merge branch 'systemd-timers' into 'master' + Replace /etc/cron.daily/leafnode with systemd timer + + Closes #2 + + See merge request leafnode-2/leafnode-2!4 + + * Replace /etc/cron.daily/leafnode with systemd timer + Fixes #2 + + A systemd/leafnode-daily.service + A systemd/leafnode-daily.timer + A systemd/leafnode-hourly.service + A systemd/leafnode-hourly.timer + +2018-05-25 Matthias Andree <[email protected]> + + * Merge branch 'mcepl/leafnode-2-man-utf8' + +2014-12-29 MatÄj Cepl <[email protected]> + + * Convert manpages to UTF8 and mark them a such. + Adding a line + + .\" -*- mode: nroff; coding: utf-8 -*- + + apparently makes groff/nroff to recognize file as UTF8 and makes it + behave accordingly (so even PS files are generated correctly). + + I have added this to all manapges which seem to matter (although not + sure with strlcpy.3 and other standard library functions ... why there + are special manpages in the repo anyway?). + + M applyfilter.8.in + M arc4random.3 + M checkgroups.8.in + M fetchnews.8.in + M filterfile.5.in + M leafnode-version.1.in + M leafnode.8.in + M mergesort.3 + M moderators.5.in + M newsq.1.in + M rbinit.3 + M rbopenlist.3 + M rnews.8.in + M sendbatch.1.in + M strlcpy.3 + M texpire.8.in + +2017-02-21 Matthias Andree <[email protected]> + + * Merge branch 'systemd' into 'master' + Fixes autotools on systemd-based systems. + + See merge request !1 + +2014-12-27 MatÄj Cepl <[email protected]> + + * Fixes autotools on systemd-based systems. + + M Makefile.am + A systemd/leafnode.socket + A systemd/[email protected] + +2016-06-25 Matthias Andree <[email protected]> + + * #define _DEFAULT_SOURCE for newer glibc features.h + Fixes compiler warnings about deprecation of other _*_SOURCE macros. + + M leafnode.h + +2016-04-04 Matthias Andree <[email protected]> + + * Avoid crash on missing/empty authentication file. + + M NEWS + M miscutil.c + +2015-06-28 Matthias Andree <[email protected]> + + * Gitorious -> GitLab. + + M export.sh + + * Replace defunct URLs by those that work. + + M AUTHORS + M README.html + D index.html + M leafnode.spec.in + M nntpd.c + M release.sh + +2014-12-27 MatÄj Cepl <[email protected]> + + * Replace COPYING.LGPL with a fresh copy. + Fresh version from http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + + Also fixed up FSF addresses in all other source files. + + M COPYING.LGPL + M dirutil.c + M fopen_reg.c + M getaline.c + M getline.c + M gmtoff.c + M grouplist.c + M link_force.c + M link_force.h + M lockfile.c + M mastring.c + M redblack.c + M redblack.h + + * Apparently leafnode-2 as of now builds with autoconf 2.63 + Which makes it possible to build it with RHEL-6. + + M configure.ac + +2014-12-16 Matthias Andree <[email protected]> + + * Convert to UTF-8. Suggested by MatÄj Cepl. + + M TODO + +2014-08-06 Matthias Andree <[email protected]> + + * Add Lloyd Zusman and Robert Grimm to authors file. + + M AUTHORS + + * Add MatÄj Cepl, and convert to UTF-8. + + M AUTHORS + + * Fix logic in description. + + M NEWS + +2014-07-30 Matthias Andree <[email protected]> + + * Ignore test-driver. + + M .gitignore + + * Update autoconf/automake A?_INIT* macros. + + M configure.ac + 2014-07-27 Matthias Andree <[email protected]> * Another release for the day. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/NEWS new/leafnode-2.0.0+git.1677927696.44d2783/NEWS --- old/leafnode-2.0.0+git.1625851959.1275fbe/NEWS 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/NEWS 2023-03-04 12:01:36.000000000 +0100 @@ -1,6 +1,10 @@ KNOWN BUGS: * The code sometimes uses timeout_client where it should use a server timeout. | +2.0.0.alpha202301: Changes since 202101: +- Bugfix: store messages with folded header lines such as Message-ID, + reported by MatÄj Cepl via leafnode-list@. + 2.0.0.alpha202101: Changes since 20140727b: - Add systemd/ daily and hourly timers for texpire and fetchnews, courtesy of MatÄj Cepl, Gitlab merge request !4. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/configparam.c new/leafnode-2.0.0+git.1677927696.44d2783/configparam.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/configparam.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/configparam.c 2023-03-04 12:01:36.000000000 +0100 @@ -17,7 +17,7 @@ } /*@null@*/ /*@dependent@*/ const struct configparam * -find_configparam(register const char *name) +find_configparam(const char *name) { return (const struct configparam *) bsearch(name, configparam, count_configparam, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/configparam.h new/leafnode-2.0.0+git.1677927696.44d2783/configparam.h --- old/leafnode-2.0.0+git.1625851959.1275fbe/configparam.h 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/configparam.h 2023-03-04 12:01:36.000000000 +0100 @@ -17,5 +17,5 @@ extern const struct configparam configparam[]; extern const int count_configparam; /*@null@*/ /*@dependent@*/ const struct configparam * -find_configparam(register const char *name); +find_configparam(const char *name); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/configure.ac new/leafnode-2.0.0+git.1677927696.44d2783/configure.ac --- old/leafnode-2.0.0+git.1625851959.1275fbe/configure.ac 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/configure.ac 2023-03-04 12:01:36.000000000 +0100 @@ -2,27 +2,27 @@ dnl written by Cornelius Krasel & Matthias Andree, 1999 - 2001 dnl written by Matthias Andree, 2002 - 2021 dnl Process this file with autoconf to produce a configure script. -AC_INIT([leafnode],[2.0.0.alpha202101]) +AC_INIT([leafnode],[2.0.0.alpha202301]) AC_CONFIG_SRCDIR([leafnode.h]) AM_INIT_AUTOMAKE([silent-rules]) AM_SILENT_RULES([yes]) -AC_PREREQ([2.63]) +AC_PREREQ([2.71]) AC_CONFIG_SRCDIR(leafnode.h) AC_CONFIG_HEADERS([config.h]) dnl AM_MAINTAINER_MODE -dnl Checks for programs. +AC_USE_SYSTEM_EXTENSIONS AC_C_INLINE AC_CHECK_TOOL([STRIP],[strip]) AC_PATH_PROG([ID], [id], [false], /usr/xpg4/bin:/usr/bin:/bin) AC_PROG_AWK AC_PROG_CC -AC_PROG_CC_C99 AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB + AC_CHECK_TOOL(AR,ar,ar) AC_PATH_PROG(LYNX,lynx,no) AC_PATH_PROG(RPM,rpm) @@ -188,7 +188,7 @@ LF=`$PCRECONFIG --libs` case $LF in ?*) -AC_MSG_NOTICE([adding $LF to LDFLAGS]); LDFLAGS="$LDFLAGS $LF"; export LDFLAGS +AC_MSG_NOTICE([adding $LF to LIBS]); LIBS="$LIBS $LF"; export LIBS ;; esac AC_CACHE_CHECK(for pcre.h,ac_cv_header_pcre_h,[ @@ -197,12 +197,19 @@ if test "x$ac_cv_header_pcre_h" = xyes then - AC_CHECK_LIB(pcre, pcre_compile) + AC_MSG_CHECKING([for pcre_compile() in PCRE library]) + AC_CACHE_VAL([ln_cv_have_libpcre], [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include <pcre.h>]], + [[pcre_compile(0, 0, 0, 0, 0);]])], + [ln_cv_have_libpcre=yes], [ln_cv_have_libpcre=no]) + ]) + AC_MSG_RESULT([$ln_cv_have_libpcre]) fi -if test "x$ac_cv_lib_pcre_pcre_compile" = xyes +if test "x$ln_cv_have_libpcre" = xyes then - AC_DEFINE(HAVE_LIBPCRE) + AC_DEFINE(HAVE_LIBPCRE, 1, [Set if PCRE library is present.]) else echo "*** I cannot find PCRE. leafnode depends on it." echo "***" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/configutil.c new/leafnode-2.0.0+git.1677927696.44d2783/configutil.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/configutil.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/configutil.c 2023-03-04 12:01:36.000000000 +0100 @@ -93,7 +93,7 @@ le = strcspn(p, "=#"); /* strip trailing space */ while(le && strchr(" \t", p[le-1])) le--; - len = min(le, TOKENSIZE - 1); + len = min(le, TOKENSIZE - (size_t)1); if (!len) return 0; memcpy(param, p, len); param[len] = '\0'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/fetchnews.c new/leafnode-2.0.0+git.1677927696.44d2783/fetchnews.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/fetchnews.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/fetchnews.c 2023-03-04 12:01:36.000000000 +0100 @@ -187,7 +187,7 @@ static long split_serverarg(char *p, char sep) { - char *s[3], *t, delim[] = { '\0', '\0' }; + char *s[3] = {}, *t, delim[] = { '\0', '\0' }; long port = 0; int i = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/leafnode.8.in new/leafnode-2.0.0+git.1677927696.44d2783/leafnode.8.in --- old/leafnode-2.0.0+git.1625851959.1275fbe/leafnode.8.in 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/leafnode.8.in 2023-03-04 12:01:36.000000000 +0100 @@ -586,7 +586,7 @@ .br Written and Copyright 2002 by Ralf Wildenhues <[email protected]> .br -Written and Copyright 2000 - 2005 by Matthias Andree <[email protected]>. +Written and Copyright 2000 - 2023 by Matthias Andree <[email protected]>. .PP The initial development of .B leafnode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/leafnode.h new/leafnode-2.0.0+git.1677927696.44d2783/leafnode.h --- old/leafnode-2.0.0+git.1625851959.1275fbe/leafnode.h 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/leafnode.h 2023-03-04 12:01:36.000000000 +0100 @@ -25,8 +25,14 @@ #define FALSE (0) #endif +#ifdef __cplusplus +#include <algorithm> +using std::min; +using std::max; +#else #define min(a,b) ((a) < (b) ? (a) : (b)) #define max(a,b) ((a) > (b) ? (a) : (b)) +#endif #define COUNT_OF(a) (sizeof(a)/sizeof((a)[0])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/log_fclose.c new/leafnode-2.0.0+git.1677927696.44d2783/log_fclose.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/log_fclose.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/log_fclose.c 2023-03-04 12:01:36.000000000 +0100 @@ -14,6 +14,6 @@ { int r = fclose(f); if (r) - ln_log(LNLOG_SERR, LNLOG_CTOP, "cannot fclose(%p): %m", (void *)f); + ln_log(LNLOG_SERR, LNLOG_CTOP, "cannot fclose(): %m"); return r; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/mastring.c new/leafnode-2.0.0+git.1677927696.44d2783/mastring.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/mastring.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/mastring.c 2023-03-04 12:01:36.000000000 +0100 @@ -59,7 +59,7 @@ } #undef min -#define min(a,b) ((a < b) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) /** Create a new empty mastr object with an initial capacity of \a size bytes. \a size must be non-zero. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/mergesort.c new/leafnode-2.0.0+git.1677927696.44d2783/mergesort.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/mergesort.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/mergesort.c 2023-03-04 12:01:36.000000000 +0100 @@ -115,14 +115,14 @@ * Arguments are as for qsort. */ int -mergesort(void *base, size_t nmemb, register size_t size, +mergesort(void *base, size_t nmemb, size_t size, int (*cmp) (const void *, const void *)) { - register int sense; - register size_t i; + int sense; + size_t i; size_t big; int iflag; - register unsigned char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2; + unsigned char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2; unsigned char *list2, *list1, *p2, *p, *last, **p1; if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/newsq.c new/leafnode-2.0.0+git.1677927696.44d2783/newsq.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/newsq.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/newsq.c 2023-03-04 12:01:36.000000000 +0100 @@ -87,12 +87,16 @@ fprintf(stderr, "Header missing in file %s\n", de->d_name); } (void)fclose(f); - if (fr) - free(fr); - if (ng) - free(ng); + if (da) + free(da); + if (mi) + free(mi); if (su) free(su); + if (ng) + free(ng); + if (fr) + free(fr); } else fprintf(stderr, "Cannot open %s\n", de->d_name); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/store.c new/leafnode-2.0.0+git.1677927696.44d2783/store.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/store.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/store.c 2023-03-04 12:01:36.000000000 +0100 @@ -1,7 +1,7 @@ /** \file store.c * Store article into news store. - * Copyright 2001 - 2005 by Matthias Andree <[email protected]> - * \date 2001 - 2005 + * Copyright 2001 - 2023 by Matthias Andree <[email protected]> + * \date 2001 - 2023 * \author Matthias Andree * \bug Can corrupt .overview files when used across NFS. * @@ -87,6 +87,49 @@ #define BAIL(r,msg) { rc = (r); if (*msg) ln_log(LNLOG_SERR, LNLOG_CARTICLE, ("store: " msg)); goto bail; } +/** get a folded line without unfolding it */ +static +ssize_t mastr_getfoldedln(mastr *linebuffer /** output buffer to read into */, + FILE *istream /** input stream */, + ssize_t maxbytes /** maximum byte count, -1 == unlimited */) +{ + int inchar; + ssize_t icount = 0; + mastr *matmp = 0; + + /* read first line */ + if ((maxbytes > 0 || maxbytes == -1) && + (icount = mastr_getln(linebuffer, istream, maxbytes)) > 0) + { + if (-1 != maxbytes) maxbytes -= icount; + } + if (icount < 0) return icount; + + while (maxbytes > 0 || -1 == maxbytes) { /* loop peeking at the next line to see if it starts with whitespace */ + int rv; + inchar = fgetc(istream); + rv = ungetc(inchar, istream); + if (EOF == rv) return -1; /* error */ + if (EOF == inchar) break; /* end of input, return normally */ + if (!strchr(" \t", inchar)) break; /* not a folded line */ + if (!matmp) matmp = mastr_new(4095); + icount = mastr_getln(matmp, istream, maxbytes); + if (icount < 0) { + if (matmp) mastr_delete(matmp); + return icount; + } + if (-1 != maxbytes) maxbytes -= icount; + mastr_chop(linebuffer); + mastr_vcat(linebuffer, "\n", mastr_str(matmp), NULL); + } + + if (matmp) mastr_delete(matmp); + return mastr_len(linebuffer); /* RFC-850 (rnews) states that CRLF + line termination is to be counted + as one character */ +} + + /** Read an article from input stream and store it into message.id and * link it into the newsgroups. * \return @@ -179,14 +222,14 @@ * - check count of each mandatory header */ while ((maxbytes > 0 || maxbytes == -1) && - (s = mastr_getln(ln, in, maxbytes)) > 0) { - if (maxbytes != -1) maxbytes -= s; - mastr_chop(ln); + (s = mastr_getfoldedln(ln, in, maxbytes)) > 0) { + if (-1 != maxbytes) maxbytes -= s; if (debugmode & DEBUG_STORE) ln_log(LNLOG_SDEBUG, LNLOG_CARTICLE, "store: read %ld bytes: \"%s\", to go: %ld", (long)mastr_len(ln), mastr_str(ln), (long)maxbytes); + mastr_chop(ln); if (!mastr_len(ln)) { found_body = 1; break; /* end of headers */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/strlcpy.c new/leafnode-2.0.0+git.1677927696.44d2783/strlcpy.c --- old/leafnode-2.0.0+git.1625851959.1275fbe/strlcpy.c 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/strlcpy.c 2023-03-04 12:01:36.000000000 +0100 @@ -46,9 +46,9 @@ size_t strlcpy(char *dst, const char *src, size_t siz) { - register char *d = dst; - register const char *s = src; - register size_t n = siz; + char *d = dst; + const char *s = src; + size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/leafnode-2.0.0+git.1625851959.1275fbe/ugid.h new/leafnode-2.0.0+git.1677927696.44d2783/ugid.h --- old/leafnode-2.0.0+git.1625851959.1275fbe/ugid.h 2021-07-09 19:32:39.000000000 +0200 +++ new/leafnode-2.0.0+git.1677927696.44d2783/ugid.h 2023-03-04 12:01:36.000000000 +0100 @@ -1,11 +1,9 @@ #ifndef UGID_H #define UGID_H -#ifndef _BSD_SOURCE -#define _BSD_SOURCE -#endif - +#include "config.h" #include <sys/types.h> + extern int uid_ensure(uid_t); extern int uid_set(uid_t); extern uid_t uid_get(void);
