Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/ntfstools
In directory usw-pr-cvs1:/tmp/cvs-serv10869
Modified Files:
ntfsresize.c
Log Message:
Little fix to ntfsresize.
Index: ntfsresize.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/ntfsresize.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -U2 -r1.2 -r1.3
--- ntfsresize.c 8 Jul 2002 23:27:17 -0000 1.2
+++ ntfsresize.c 9 Jul 2002 00:00:19 -0000 1.3
@@ -426,10 +426,10 @@
ntfs_inode *ni;
- uchar_t *ustr = AT_NONAME;
+ uchar_t *ustr = NULL;
int len = 0;
-
+
if (!(ni = ntfs_open_inode(vol, mref)))
perr_exit("ntfs_open_inode");
-
+
if (!(*ctx = ntfs_get_attr_search_ctx(ni, NULL)))
perr_exit("ntfs_get_attr_search_ctx");
@@ -437,4 +437,9 @@
if (aname && ((len = ntfs_mbstoucs(aname, &ustr, 0)) == -1))
perr_exit("Unable to convert string to Unicode");
+
+ if (!ustr || !len) {
+ ustr = AT_NONAME;
+ len = 0;
+ }
if (ntfs_lookup_attr(AT_DATA, ustr, len, 0, 0, NULL, 0, *ctx))
|