Re: Review code changes for handling huge lines?

David Levine <[email protected]>
Newsgroups gmane.mail.nmh.devel
Message-ID <[email protected]>
Andy wrote:

> There was  some interest  but I  believe it  got lost  in the  nmh 1.7.1
> shuffle. After patching up my OS to  the latest, I found that it was now
> running nmh 1.8, but  was missing the code and so  I tried applying that
> patch locally  against my  system and  have been  running it  since then
> (January of this year 2024) without issues.

> Any interest in renewing a discussion about this?

I'd be interested in hearing from Ken and Ralph, at least, if they're
available.

Just to note that we would need a test suite addition that shows what the
change fixes.  Also, there are these gcc warnings with these settings
(from build_nmh -d), based on what Fedora has used:

CFLAGS="-g -std=c99 -pedantic -Wformat -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fno-omit-frame-pointer -fstack-clash-protection -fcf-protection -O0"

../../uip/popsbr.c: In function ‘traverse’:
../../uip/popsbr.c:592:43: warning: pointer targets in passing argument 2 of ‘netsec_read’ differ in signedness [-Wpointer-sign]
  592 |             len = netsec_read(nsc, buffer + inoffset, unused, &errstr);
      |                                    ~~~~~~~^~~~~~~~~~
      |                                           |
      |                                           char *
In file included from ../../uip/popsbr.c:14:
../../h/netsec.h:169:64: note: expected ‘unsigned char *’ but argument is of type ‘char *’
  169 | ssize_t netsec_read(netsec_context *ns_context, unsigned char *buffer,
      |                                                 ~~~~~~~~~~~~~~~^~~~~~
../../uip/popsbr.c:593:21: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits]
  593 |             if (len < 0) {
      |                     ^

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.