Changes by: uvman
Update of /cvs/linux-ntfs/ntfsprogs/libntfs
In directory delta357:/tmp/cvs-serv23852/libntfs
Modified Files:
index.c
Log Message:
Fix wrong error logic that would lead to segfault when malloc fails.
Index: index.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/libntfs/index.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- index.c 30 Oct 2006 13:29:45 -0000 1.36
+++ index.c 30 Oct 2006 19:40:56 -0000 1.37
@@ -385,11 +385,11 @@ static INDEX_ENTRY *ntfs_ie_dup_novcn(IN
size -= sizeof(VCN);
dup = ntfs_malloc(size);
- if (dup)
+ if (dup) {
memcpy(dup, ie, size);
-
- dup->flags &= ~INDEX_ENTRY_NODE;
- dup->length = size;
+ dup->flags &= ~INDEX_ENTRY_NODE;
+ dup->length = size;
+ }
return dup;
}
|