Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13989/libntfs
Modified Files:
attrib.c
Log Message:
Fix silly bug introduced in 1.12.0 which breaks ntfsfix (and others
possibly) when calling ntfs_attr_lookup() with AT_UNNAMED name and
no ntfs inode in the search context. (Anton)
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -p -r1.182 -r1.183
--- attrib.c 15 Oct 2005 11:33:42 -0000 1.182
+++ attrib.c 15 Oct 2005 20:52:41 -0000 1.183
@@ -1576,7 +1576,7 @@ static int ntfs_attr_find(const ATTR_TYP
upcase = vol->upcase;
upcase_len = vol->upcase_len;
} else {
- if (name) {
+ if (name && name != AT_UNNAMED) {
errno = EINVAL;
return -1;
}
@@ -2187,9 +2187,9 @@ int ntfs_attr_lookup(const ATTR_TYPES ty
ntfs_volume *vol;
ntfs_inode *base_ni;
- if (!ctx || !ctx->mrec || !ctx->attr || (name && (!ctx->ntfs_ino ||
- !(vol = ctx->ntfs_ino->vol) || !vol->upcase ||
- !vol->upcase_len))) {
+ if (!ctx || !ctx->mrec || !ctx->attr || (name && name != AT_UNNAMED &&
+ (!ctx->ntfs_ino || !(vol = ctx->ntfs_ino->vol) ||
+ !vol->upcase || !vol->upcase_len))) {
errno = EINVAL;
return -1;
}
|