bug in testing of message id's
Chris Niekel <[email protected]>
| Newsgroups | gmane.network.sn |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Ocassionally, I get a message that some messageid's are illegal, and
that it has been replaced. I've been searching for the cause, and am
looking at some strange code in int addr_domain(char* buf) (addr.c)
The behaviour:
[email protected] is good,
[email protected] is bad
[email protected] is good.
The code treats the '-' about the same as a '.', and thus doesn't allow
multiple dashes after another. For the dot ('.') that makes sense, but
for the '-', it's not right.
If I change the order of the '.' and the '-' in the case statement, my
test-cases behave as expected.
Patrik, do you think that the applied patch fixes this bug?
A bug was submitted for this in Debian, so I'd like to apply this patch
and close the bug.
Regards,
Chris Niekel
--
I've been down so long, if I'd cheer up, I'd still be depressed.
- Lisa Simpson, Moanin' Lisa Blues.
snpatch
(text/plain, 661 B)
--- orig/addr.c
+++ mod/addr.c
@@ -41,14 +41,14 @@
for (; ; p++)
switch (*p)
{
- C('-')
- if (lb)
- return 0; /* else fall through */
C('.')
if (p == buf || *p == p[-1] || !p[1])
return 0;
else
continue; /* Bugfix: no fall through */
+ C('-')
+ if (lb)
+ return 0; /* else fall through */
C('a') C('b') C('c') C('d') C('e') C('f') C('g') C('h') C('i')
C('j') C('k') C('l') C('m') C('n') C('o') C('p') C('q') C('r')
C('s') C('t') C('u') C('v') C('w') C('x') C('y') C('z')
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAgsv6gQ3S2XWlk0sRAhbbAJ9I5uGCueC3v9xH5EzkSiYpT0A1eACgg/Pf +LuHjmCq/D4pvzeL3heE1Fc= =MJoE -----END PGP SIGNATURE-----