Changeset 5072:26b19fc9b78c
- Timestamp:
- 2007-04-05 17:07:58 (22 months ago)
- Author:
- Brendan Cully <brendan@…>
- Branch:
- HEAD
- Message:
-
Do not cache some unsafe header fields.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r5070
|
r5072
|
|
| 503 | 503 | { |
| 504 | 504 | unsigned char *d = NULL; |
| | 505 | HEADER nh; |
| 505 | 506 | *off = 0; |
| 506 | 507 | |
| … |
… |
|
| 520 | 521 | |
| 521 | 522 | lazy_realloc(&d, *off + sizeof (HEADER)); |
| | 523 | memcpy(&nh, header, sizeof (HEADER)); |
| | 524 | |
| | 525 | /* some fields are not safe to cache */ |
| | 526 | nh.tagged = 0; |
| | 527 | nh.changed = 0; |
| | 528 | nh.threaded = 0; |
| | 529 | nh.recip_valid = 0; |
| | 530 | nh.searched = 0; |
| | 531 | nh.matched = 0; |
| | 532 | nh.collapsed = 0; |
| | 533 | nh.limited = 0; |
| | 534 | nh.num_hidden = 0; |
| | 535 | nh.recipient = 0; |
| | 536 | nh.attach_valid = 0; |
| | 537 | nh.path = NULL; |
| | 538 | nh.tree = NULL; |
| | 539 | nh.thread = NULL; |
| | 540 | #ifdef MIXMASTER |
| | 541 | nh.chain = NULL; |
| | 542 | #endif |
| | 543 | #if defined USE_POP || defined USE_IMAP |
| | 544 | nh.data = NULL; |
| | 545 | #endif |
| | 546 | |
| 522 | 547 | memcpy(d + *off, header, sizeof (HEADER)); |
| 523 | 548 | *off += sizeof (HEADER); |