Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7046/libntfs
Modified Files:
collate.c index.c
Log Message:
* Fix filenames collation.
* Minor comment cleanup.
Index: collate.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/collate.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- collate.c 22 Aug 2005 09:00:16 -0000 1.8
+++ collate.c 26 Aug 2005 20:17:08 -0000 1.9
@@ -1,5 +1,5 @@
/*
- * collate.c - NTFS kernel collation handling. Part of the Linux-NTFS project.
+ * collate.c - NTFS collation handling. Part of the Linux-NTFS project.
*
* Copyright (c) 2004 Anton Altaparmakov
* Copyright (c) 2005 Yura Pakhuchiy
Index: index.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/index.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- index.c 14 Aug 2005 16:06:33 -0000 1.10
+++ index.c 26 Aug 2005 20:17:08 -0000 1.11
@@ -256,6 +256,12 @@ done:
*/
rc = ntfs_collate(vol, cr, key, key_len, &ie->key,
le16_to_cpu(ie->key_length));
+ if (rc == NTFS_COLLATION_ERROR) {
+ ntfs_error(, "Collation error. Probably filename "
+ "contain invalid characters.");
+ err = ERANGE;
+ goto err_out;
+ }
/*
* If @key collates before the key of the current entry, there
* is definitely no such key in this index but we might need to
@@ -384,6 +390,12 @@ ia_done:
*/
rc = ntfs_collate(vol, cr, key, key_len, &ie->key,
le16_to_cpu(ie->key_length));
+ if (rc == NTFS_COLLATION_ERROR) {
+ ntfs_error(, "Collation error. Probably filename "
+ "contain invalid characters.");
+ err = ERANGE;
+ goto err_out;
+ }
/*
* If @key collates before the key of the current entry, there
* is definitely no such key in this index but we might need to
|