You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2009/08/10 12:44:35 UTC

[Bug 6176] New: spamc truncates lines read from spamc.conf

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

           Summary: spamc truncates lines read from spamc.conf
           Product: Spamassassin
           Version: 3.3.0
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: spamc/spamd
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jm@jmason.org


investigate for 3.3.0.  from the users list... Giles Malet to users Aug 7 (3
days ago):

'I'm heading off on vacation in moments, but didn't want this to get lost, as
it cost me hours of work to find!

This on:
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
spamassassin-3.2.5-1.el4.rf
spamassassin-3.2.5-1.el5.rf

If one puts the following two lines into spamc.conf (the second may wrap):

-H
-d
localhost,mailchk-w05-internal,mailchk-w04-internal,mailchk-w01-internal,mailchk-w02-internal,mailchk-m01-internal,mailchk-m02-internal,mailchk-m03-internal,mailchk-m04-internal,mailchk-m05-internal

Then one finds this in the syslog:

spamc[5471]: getaddrinfo(ma) failed: Name or service not known

.. and user preferences were not being processed (this all started with a
report that whitelisting wasn't working). Well, I'm not sure what it was doing,
but it wasn't the correct thing.

It appears that spamc reads exactly 95 bytes from that line, and silently
truncates the input. Turns out that the last thing in the buffer is `..,ma' --
thus the failed DNS lookups on `ma', and subsequent lossage. It would be better
if spamc actually took note of a full buffer, and at least backed up to the
prior separator, and at least logged this, or did something more sane than
causing user preferences to stop working!

Thanks, and apologies for perhaps not doing this properly. I can't see anything
in bugzilla, but may have missed it in my rush.

gdm'

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[commit] spamc truncates    |spamc truncates lines read
                   |lines read from spamc.conf  |from spamc.conf

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |needs 1 more vote

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #25 from Mark Martinec <Ma...@ijs.si> 2009-12-27 17:08:22 UTC ---
Reopening for a small enhancement.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #27 from Kevin A. McGrail <km...@pccc.com> 2010-01-07 17:12:19 UTC ---
(In reply to comment #26)
> +1

+1 KAM

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #19 from Justin Mason <jm...@jmason.org> 2009-12-22 03:59:48 UTC ---
(In reply to comment #18)
> I hate to be annoying, but IMO it's critical that we come up with a .t script
> to exercise the failure case found in rc1.proposed1.

I've just done this:

: 106...; svn commit -m "bug 6176: add test script for error that broke
rc1.proposed1"
Sending        MANIFEST
Adding         t/spamc_bug6176.t
Transmitting file data ..
Committed revision 893149.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #2 from Nico Prenzel <ni...@pn-systeme.de> 2009-12-17 04:58:50 UTC ---
Created an attachment (id=4607)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4607)
truncate without message fix

Hi,
this is a patch for the bug posted here. It also increases the buffer size to
150. So, the maximum character size for one line is now 148!
If configuration line exeeds the maximum then spamc quits with an error
message.

Greeting NicoP.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #12 from Mark Martinec <Ma...@ijs.si> 2009-12-17 13:52:06 UTC ---
Bug 6176: spamc truncates lines read from spamc.conf
Sending        spamc/spamc.c
Sending        spamc/spamc.h.in
Committed revision 891935.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|REGRESSION spamc truncates  |[review] spamc truncates
                   |lines read from spamc.conf  |lines read from spamc.conf
  Status Whiteboard|                            |needs 2 votes

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Nico Prenzel <ni...@pn-systeme.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nico.prenzel@pn-systeme.de

--- Comment #5 from Nico Prenzel <ni...@pn-systeme.de> 2009-12-17 05:41:27 UTC ---
Please,

hold on. It's not that well done. I'll do another round.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] REGRESSION spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #16 from Warren Togami <wt...@redhat.com> 2009-12-20 14:59:11 UTC ---
I backed this out just in case folks are dogfooding the trunk.

I am traveling most of Dec 21st.  I suppose rc1.proposed2 can be cut after you
folks decide what to do about this bug.  I will be able to cut it on Tuesday,
unless jm or somebody wants to do the cut on Monday.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] REGRESSION spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #15 from Warren Togami <wt...@redhat.com> 2009-12-19 22:47:08 UTC ---
NOTE: Output of nothing with zero return value means blackholing of mail.  Very
dangerous.  This should be a very simple test-case possible with "make test". 
A working spamd is not necessary to test this.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes               |needs one more vote

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [commit] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED
  Status Whiteboard|ready for commit            |

--- Comment #23 from Mark Martinec <Ma...@ijs.si> 2009-12-22 10:56:04 UTC ---
re-closing

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #8 from Nico Prenzel <ni...@pn-systeme.de> 2009-12-17 08:18:35 UTC ---
replace the corresponding while loop with the following:
while(!(feof(config)) && (fgets(option, CONFIG_MAX_LINE_SIZE, config) != NULL))
{

then I don't see any more case where fgets could return a null pointer.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #20 from Justin Mason <jm...@jmason.org> 2009-12-22 04:01:38 UTC ---
(In reply to comment #17)
> Created an attachment (id=4613)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4613) [details]
> proposed patch, take 2
> 
> Apparently nobody is brave enough to touch the spamc.conf, so I'm
> reluctantly doing it. Also fixed a buffer overflow when there
> are more than 24 arguments present (command line + from a config file),
> and fixed one spelling.

+1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] REGRESSION spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4611|0                           |1
        is obsolete|                            |

--- Comment #17 from Mark Martinec <Ma...@ijs.si> 2009-12-21 18:27:21 UTC ---
Created an attachment (id=4613)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4613)
proposed patch, take 2

Apparently nobody is brave enough to touch the spamc.conf, so I'm
reluctantly doing it. Also fixed a buffer overflow when there
are more than 24 arguments present (command line + from a config file),
and fixed one spelling.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #24 from Mark Martinec <Ma...@ijs.si> 2009-12-27 17:06:52 UTC ---
Created an attachment (id=4616)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4616)
Enhanced error message

Attached is a little additional patch to spamc.c to distinguish a
line-too-long condition from a non-NL-terminated line, and issue an
appropriate diagnostic for each case, instead of always claiming
that line is too long.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|spamc truncates lines read  |[review] spamc truncates
                   |from spamc.conf             |lines read from spamc.conf

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #11 from Justin Mason <jm...@jmason.org> 2009-12-17 13:26:56 UTC ---
+1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #26 from Justin Mason <jm...@jmason.org> 2010-01-07 14:11:04 UTC ---
+1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #3 from Mark Martinec <Ma...@ijs.si> 2009-12-17 05:14:53 UTC ---
Looks good to me (except for <CR>s in the patch).
I'd push the max line size to 255+2 though.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #28 from Mark Martinec <Ma...@ijs.si> 2010-01-07 17:29:52 UTC ---
Bug 6176: distinguish too long lines from non-NL-terminated (last) line
in the issued diagnostic
Sending spamc/spamc.c
Committed revision 897074.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] REGRESSION spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Warren Togami <wt...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|[review] spamc truncates    |REGRESSION spamc truncates
                   |lines read from spamc.conf  |lines read from spamc.conf

--- Comment #14 from Warren Togami <wt...@redhat.com> 2009-12-19 21:56:52 UTC ---
[warren@computer trunk]$ cat sample-nonspam.txt |spamc
[warren@computer trunk]$ echo $?
0

spamd -D sees no connection attempt from spamc.  Same result if spamd is
running or not.

http://svn.apache.org/viewvc?view=revision&revision=891935
I backed out this patch and spamc works again.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|spamc truncates lines read  |[review] spamc truncates
                   |from spamc.conf             |lines read from spamc.conf
  Status Whiteboard|                            |needs 2 votes

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [commit] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #22 from Mark Martinec <Ma...@ijs.si> 2009-12-22 10:55:15 UTC ---
Bug 6176 spamc.c fix: spamc truncates lines read from spamc.conf (take two)
Sending        spamc/spamc.c
Sending        spamc/spamc.h.in
Transmitting file data ..
Committed revision 893270.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
  Status Whiteboard|needs 1 more vote           |

--- Comment #13 from Mark Martinec <Ma...@ijs.si> 2009-12-17 13:53:06 UTC ---
Closing.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #21 from Warren Togami <wt...@redhat.com> 2009-12-22 10:44:53 UTC ---
Tested in production and reviewed patch manually.

+1

I'm cutting rc1.proposed2 after you commit this, unless somebody suggests we
delay for any particular other patch.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Justin Mason <jm...@jmason.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P5                          |P2
                 CC|                            |jm@jmason.org

--- Comment #1 from Justin Mason <jm...@jmason.org> 2009-12-07 12:59:00 UTC ---
this is quite serious; it'd be nice to fix before 3.3.0

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com

--- Comment #10 from Kevin A. McGrail <km...@pccc.com> 2009-12-17 10:58:53 UTC ---
(In reply to comment #9)
> Created an attachment (id=4611)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4611) [details]
> proposed patch
> 
> Please review and vote for the attached patch.
>   (a slightly cleaned version of V2 (tabs, cr, option_l, 8kB)).

KAM +1

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #18 from Justin Mason <jm...@jmason.org> 2009-12-22 03:02:29 UTC ---
(In reply to comment #17)
> Created an attachment (id=4613)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4613) [details]
> proposed patch, take 2
> 
> Apparently nobody is brave enough to touch the spamc.conf, so I'm
> reluctantly doing it. Also fixed a buffer overflow when there
> are more than 24 arguments present (command line + from a config file),
> and fixed one spelling.

I hate to be annoying, but IMO it's critical that we come up with a .t script
to exercise the failure case found in rc1.proposed1.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #7 from Mark Martinec <Ma...@ijs.si> 2009-12-17 06:29:14 UTC ---
(In reply to comment #6)
> Created an attachment (id=4608)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4608) [details]
> truncate without message fix V2

+ if( (option[strlen(option)-1] != '\n') && (!feof(config)) ) {

Hmm, fgets could conceivably return an empty string (null at index 0),
so strlen(option)-1 could yield a -1. Better to be safe and test
the length first.

> Ok. Here is the second version. Does apply to trunk (without my first patch).
> And again with the not wanted <CRs>. Sorry, don't know how to easily get rid of
> that.

No problem, we just need to be careful when applying a patch.

> First version had a problem that it exited to early (in case of -V).

Thanks.

> Also, applied larger line maximum (257). But, that's your decision.

Good. I don't mind any reasonably large value. Justin's 8k is good too.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #6 from Nico Prenzel <ni...@pn-systeme.de> 2009-12-17 06:10:46 UTC ---
Created an attachment (id=4608)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4608)
truncate without message fix V2

Ok. Here is the second version. Does apply to trunk (without my first patch).
And again with the not wanted <CRs>. Sorry, don't know how to easily get rid of
that.

First version had a problem that it exited to early (in case of -V).
Also, applied larger line maximum (257). But, that's your decision.

NicoP.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4607|0                           |1
        is obsolete|                            |
   Attachment #4608|0                           |1
        is obsolete|                            |

--- Comment #9 from Mark Martinec <Ma...@ijs.si> 2009-12-17 10:31:43 UTC ---
Created an attachment (id=4611)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4611)
proposed patch

Please review and vote for the attached patch.
  (a slightly cleaned version of V2 (tabs, cr, option_l, 8kB)).

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

--- Comment #4 from Justin Mason <jm...@jmason.org> 2009-12-17 05:38:42 UTC ---
why not something much higher? 8192 for instance?

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [commit] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Warren Togami <wt...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[review] spamc truncates    |[commit] spamc truncates
                   |lines read from spamc.conf  |lines read from spamc.conf
  Status Whiteboard|needs one more vote         |ready for commit

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6176] [review] spamc truncates lines read from spamc.conf

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6176

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes               |needs 1 more vote

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.