[dovecot-cvs] dovecot/src/plugins/fts-squat squat-trie.c, 1.10, 1.11
tss at dovecot.org
tss at dovecot.org
Wed Dec 13 13:49:48 UTC 2006
- Previous message: [dovecot-cvs] dovecot/src/plugins/fts-squat squat-trie.c, 1.9, 1.10 squat-trie.h, 1.3, 1.4
- Next message: [dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.20, 1.21 auth-request-handler.h, 1.7, 1.8 db-ldap.c, 1.56, 1.57 db-sql.c, 1.9, 1.10 main.c, 1.57, 1.58
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/plugins/fts-squat
In directory talvi:/tmp/cvs-serv29020
Modified Files:
squat-trie.c
Log Message:
Handle broken UTF8
Index: squat-trie.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/fts-squat/squat-trie.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- squat-trie.c 13 Dec 2006 13:46:23 -0000 1.10
+++ squat-trie.c 13 Dec 2006 13:49:46 -0000 1.11
@@ -252,8 +252,12 @@
/* FIXME: can we do anything better than just
truncate with >16bit values? */
uchr = uni_utf8_get_char_len(src+i, size-i);
- uchr -= 32 - 26;
- chr = uchr < (uint16_t)-1 ? uchr : 0;
+ if (uchr == (unichar_t)-1)
+ chr = 0;
+ else {
+ uchr -= 32 - 26;
+ chr = uchr < (uint16_t)-1 ? uchr : 0;
+ }
i += uni_utf8_skip[src[i] & 0xff] - 1;
}
buffer_append(dest, &chr, sizeof(chr));
- Previous message: [dovecot-cvs] dovecot/src/plugins/fts-squat squat-trie.c, 1.9, 1.10 squat-trie.h, 1.3, 1.4
- Next message: [dovecot-cvs] dovecot/src/auth auth-request-handler.c, 1.20, 1.21 auth-request-handler.h, 1.7, 1.8 db-ldap.c, 1.56, 1.57 db-sql.c, 1.9, 1.10 main.c, 1.57, 1.58
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list