[dovecot-cvs] dovecot/src/lib-storage/index index-search.c,1.48,1.49
cras at procontrol.fi
cras at procontrol.fi
Sun Dec 8 07:23:10 EET 2002
- Previous message: [dovecot-cvs] dovecot/src/lib-storage mail-sort.c,1.3,1.4 mail-storage.c,1.4,1.5
- Next message: [dovecot-cvs] dovecot/src/login client-authenticate.c,1.19,1.20 client.c,1.16,1.17 client.h,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-storage/index
In directory danu:/tmp/cvs-serv19285/lib-storage/index
Modified Files:
index-search.c
Log Message:
Added buffer API. Point is to hide all buffer writing behind this API which
verifies that nothing overflows. Much better than doing the same checks all
around the code, even if it is slightly slower.
Buffer reading is still mostly done directly, that isn't such a big security
risk and I can't think of a reasonable API for it anyway.
Index: index-search.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- index-search.c 6 Dec 2002 01:09:23 -0000 1.48
+++ index-search.c 8 Dec 2002 05:23:08 -0000 1.49
@@ -402,7 +402,7 @@
}
size = strlen(field);
- ret = message_header_search(field, &size,
+ ret = message_header_search(field, size,
hdr_search_ctx) ? 1 : 0;
}
}
@@ -487,15 +487,18 @@
return;
}
+ t_push();
+
/* then check if the value matches */
hdr_search_ctx = search_header_context(ctx->index_context, arg);
if (hdr_search_ctx == NULL)
ret = 0;
else {
len = ctx->value_len;
- ret = message_header_search(ctx->value, &len,
+ ret = message_header_search(ctx->value, len,
hdr_search_ctx) ? 1 : 0;
}
+ t_pop();
ARG_SET_RESULT(arg, ret);
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage mail-sort.c,1.3,1.4 mail-storage.c,1.4,1.5
- Next message: [dovecot-cvs] dovecot/src/login client-authenticate.c,1.19,1.20 client.c,1.16,1.17 client.h,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list