Leah Neukirchen
|
35c11688eb
|
blaze822: compress_hdr: avoid stepping h too far
This resulted in the message consisting of the empty line to contain a
single header which consisted of only a space.
|
7 years ago |
Leah Neukirchen
|
2708f184e9
|
blaze822: blaze822_addr: empty ttok after using it
|
7 years ago |
Leah Neukirchen
|
86b08d1925
|
blaze822: blaze822_addr: spaces in local-part need quoting too
|
7 years ago |
Leah Neukirchen
|
4e18bb2131
|
blaze822: blaze822_addr: make < in <> reset mail address parsing
|
7 years ago |
Leah Neukirchen
|
fce30ace50
|
blaze822: blaze822_addr: move previous addr contents to disp
|
7 years ago |
Leah Neukirchen
|
09c92d5dd8
|
blaze822: blaze822_addr: <> always resets the address
|
7 years ago |
Leah Neukirchen
|
effc645f8a
|
blaze822: safe_append: off by one
|
7 years ago |
Leah Neukirchen
|
a5026c9b99
|
blaze822: blaze822_addr: rewrite address parsing
This hopefully fixes many bugs and subtleties related to extracting
adresses.
|
7 years ago |
Leah Neukirchen
|
be6bbf6056
|
blaze822: blaze822_addr: ensure strlen is not run on null pointer
Found by Larry Hynes.
|
7 years ago |
Leah Neukirchen
|
ce9ac3aff4
|
blaze822: blaze822_addr: quote local-part if needed
|
7 years ago |
Leah Neukirchen
|
66d0eff12f
|
style
|
7 years ago |
Leah Neukirchen
|
635dfe95ad
|
blaze822: blaze822_addr: support backslashes in atoms
This happens a lot in the real world, even if it's not RFC conforming.
|
7 years ago |
Leah Neukirchen
|
ea32b6a45e
|
blaze822: blaze822_addr: ensure space for terminal null
|
7 years ago |
Leah Neukirchen
|
4ac581b131
|
blaze822: blaze822_addr: unquote quoted strings
|
7 years ago |
Leah Neukirchen
|
4d2607fe21
|
blaze822: blaze822_addr: skip spaces after >
|
7 years ago |
Leah Neukirchen
|
10a011b94e
|
blaze822: blaze822_addr: use memcpy instead of strcpy, we know the length
|
7 years ago |
Leah Neukirchen
|
2b4e3aa66d
|
clean up whitespace
|
8 years ago |
Christian Neukirchen
|
06cc4bd693
|
mblaze822: blaze822_addr: add simple group parsing
Just ignores the group name, and considers ; an address separator too.
|
8 years ago |
Christian Neukirchen
|
e725365d45
|
blaze822: blaze822_addr: add bounds check when extracting display name
Discovered using the TREC 2005 Spam Public Corpora.
http://plg.uwaterloo.ca/~gvcormac/treccorpus/README.html
|
8 years ago |
Christian Neukirchen
|
4bb35cbead
|
blaze822: blaze822_addr: make a bit more robust
Start over when seeing another < in the address part.
Support "..." in the address part.
|
8 years ago |
Christian Neukirchen
|
d458439970
|
import and use timegm from musl
It's ridiculous this function is not in the standards.
|
8 years ago |
Christian Neukirchen
|
7575e07b9f
|
blaze822: keep a pointer to the original header, if we have it anyway
|
8 years ago |
Christian Neukirchen
|
2aaa3cecd8
|
blaze822: blaze822_chdr: downcase header
|
8 years ago |
Christian Neukirchen
|
4296c369f6
|
blaze822: blaze822_hdr_: off-by-one for first header
|
8 years ago |
Christian Neukirchen
|
7636f0977c
|
blaze822: blaze822_file: allocate enough space for read
|
8 years ago |
Christian Neukirchen
|
3d0c2f8b47
|
cleanups
|
8 years ago |
Christian Neukirchen
|
fc4c696e3d
|
blaze822: blaze822_file: allow unknown file size (e.g. pipes)
|
8 years ago |
Christian Neukirchen
|
6592bdb912
|
import musl memmem
|
8 years ago |
Christian Neukirchen
|
182a32ff9d
|
blaze822: blaze822_addr: return 0 when no address is found
Also return null pointers instead of empty strings.
|
8 years ago |
Christian Neukirchen
|
ac679b264c
|
blaze822: fix header finding with CRLF
|
8 years ago |
Christian Neukirchen
|
98c03d9023
|
blaze822: forgot to free
Found by clang-analyzer.
|
8 years ago |
Christian Neukirchen
|
c12aa23777
|
blaze822: fix months. duh
|
8 years ago |
Christian Neukirchen
|
22f456a2a0
|
clean up header includes
|
8 years ago |
Christian Neukirchen
|
08032f89ba
|
seq: import most parts of mseq, make blaze822_loop resolve ranges
|
8 years ago |
Christian Neukirchen
|
d1e4b5f503
|
blaze822: add blaze822_headerlen
|
8 years ago |
Christian Neukirchen
|
963380c9f1
|
blaze822: add blaze822_chdr to search for a header passed as C string
|
8 years ago |
Christian Neukirchen
|
54f695dddf
|
blaze822: iterate over headers
|
8 years ago |
Christian Neukirchen
|
f101b728d9
|
blaze822: add mmap-based mail reader
|
8 years ago |
Christian Neukirchen
|
7b6436797c
|
blaze822: remaining fixes in new loop
|
8 years ago |
Christian Neukirchen
|
1ff1ff3dd0
|
blaze822: avoid overflow in blaze822_hdr_
|
8 years ago |
Christian Neukirchen
|
266b904897
|
blaze822: rewrite inner loop
Do nul and crlf clean up first, only when required.
Replace line-detection loop with strchr.
|
8 years ago |
Christian Neukirchen
|
4798cb386e
|
blaze822: allow freeing of null pointers
|
8 years ago |
Christian Neukirchen
|
005037e254
|
blaze822: blaze822_mem: use body=bodyend instead of body=0
Else we lose track of where we are during multipart when there is no
body (really a body of length 0).
|
8 years ago |
Christian Neukirchen
|
411c9b632a
|
blaze822: detect too short/empty headers
|
8 years ago |
Christian Neukirchen
|
d0d371114c
|
blaze822: compression fixes
|
8 years ago |
Christian Neukirchen
|
d687378b62
|
blaze822: give in and actually unfold the lines
|
8 years ago |
Christian Neukirchen
|
00954008cc
|
blaze822: free line in blaze822_loop
|
8 years ago |
Christian Neukirchen
|
39006b8c89
|
blaze822: off by one in blaze822_mem
|
8 years ago |
Christian Neukirchen
|
5b84593e78
|
blaze822: fix blaze822_mem body start
|
8 years ago |
Christian Neukirchen
|
6b639da842
|
blaze822: fix blaze822_file return value on error
|
8 years ago |