[dovecot-cvs] dovecot/src/lib-index mail-index.c,1.80,1.81 mail-modifylog.c,1.38,1.39 mail-tree.c,1.13,1.14
cras at procontrol.fi
cras at procontrol.fi
Thu Jan 9 14:35:18 EET 2003
- Previous message: [dovecot-cvs] dovecot/src/login auth-connection.c,1.18,1.19 auth-connection.h,1.7,1.8 client-authenticate.c,1.31,1.32 client.c,1.26,1.27 client.h,1.11,1.12
- Next message: [dovecot-cvs] dovecot/src/lib-mail message-date.c,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv24274/lib-index
Modified Files:
mail-index.c mail-modifylog.c mail-tree.c
Log Message:
Make sure hdr->used_file_size isn't too small.
Index: mail-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- mail-index.c 5 Jan 2003 13:09:52 -0000 1.80
+++ mail-index.c 9 Jan 2003 12:35:16 -0000 1.81
@@ -53,7 +53,8 @@
return FALSE;
}
- if ((hdr->used_file_size - sizeof(struct mail_index_header)) %
+ if (hdr->used_file_size < sizeof(struct mail_index_header) ||
+ (hdr->used_file_size - sizeof(struct mail_index_header)) %
sizeof(struct mail_index_record) != 0) {
index_set_corrupted(index, "Invalid used_file_size in header "
"(%"PRIuUOFF_T")",
Index: mail-modifylog.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-modifylog.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- mail-modifylog.c 5 Jan 2003 13:09:52 -0000 1.38
+++ mail-modifylog.c 9 Jan 2003 12:35:16 -0000 1.39
@@ -230,7 +230,8 @@
return FALSE;
}
- if ((hdr->used_file_size - sizeof(struct modify_log_header)) %
+ if (hdr->used_file_size < sizeof(struct modify_log_header) ||
+ (hdr->used_file_size - sizeof(struct modify_log_header)) %
sizeof(struct modify_log_record) != 0) {
modifylog_set_corrupted(file,
"Invalid used_file_size in header (%"PRIuUOFF_T")",
Index: mail-tree.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-tree.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- mail-tree.c 5 Jan 2003 13:09:52 -0000 1.13
+++ mail-tree.c 9 Jan 2003 12:35:16 -0000 1.14
@@ -106,7 +106,8 @@
return FALSE;
}
- if ((hdr->used_file_size - sizeof(struct mail_tree_header)) %
+ if (hdr->used_file_size < sizeof(struct mail_tree_header) ||
+ (hdr->used_file_size - sizeof(struct mail_tree_header)) %
sizeof(struct mail_tree_node) != 0) {
_mail_tree_set_corrupted(tree,
"Invalid used_file_size in header (%"PRIuUOFF_T")",
- Previous message: [dovecot-cvs] dovecot/src/login auth-connection.c,1.18,1.19 auth-connection.h,1.7,1.8 client-authenticate.c,1.31,1.32 client.c,1.26,1.27 client.h,1.11,1.12
- Next message: [dovecot-cvs] dovecot/src/lib-mail message-date.c,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list