Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6765/libntfs
Modified Files:
attrib.c
Log Message:
Fix bogus le16_to_cpu() which shouldbe le32_to_cpu() when accessing
the attribute list entry attribute type in some places in
libntfs/attrib.c. (Anton)
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -p -r1.181 -r1.182
--- attrib.c 30 Sep 2005 18:57:00 -0000 1.181
+++ attrib.c 15 Oct 2005 11:33:42 -0000 1.182
@@ -1813,8 +1813,8 @@ static int ntfs_external_attr_find(ATTR_
* attribute.
*/
if ((type == AT_UNUSED) && is_first_search &&
- le16_to_cpu(al_entry->type) >
- le16_to_cpu(AT_ATTRIBUTE_LIST))
+ le32_to_cpu(al_entry->type) >
+ le32_to_cpu(AT_ATTRIBUTE_LIST))
goto find_attr_list_attr;
} else {
al_entry = (ATTR_LIST_ENTRY*)((char*)ctx->al_entry +
@@ -1825,10 +1825,10 @@ static int ntfs_external_attr_find(ATTR_
* attribute list attribute from the base mft record as it is
* not listed in the attribute list itself.
*/
- if ((type == AT_UNUSED) && le16_to_cpu(ctx->al_entry->type) <
- le16_to_cpu(AT_ATTRIBUTE_LIST) &&
- le16_to_cpu(al_entry->type) >
- le16_to_cpu(AT_ATTRIBUTE_LIST)) {
+ if ((type == AT_UNUSED) && le32_to_cpu(ctx->al_entry->type) <
+ le32_to_cpu(AT_ATTRIBUTE_LIST) &&
+ le32_to_cpu(al_entry->type) >
+ le32_to_cpu(AT_ATTRIBUTE_LIST)) {
int rc;
find_attr_list_attr:
|