Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dab35a
)
b=9300
author
tappro
<tappro>
Mon, 12 Sep 2005 23:21:21 +0000
(23:21 +0000)
committer
tappro
<tappro>
Mon, 12 Sep 2005 23:21:21 +0000
(23:21 +0000)
no space was allocated for final zero at the end of string.
lustre/mds/mds_audit_path.c
patch
|
blob
|
history
diff --git
a/lustre/mds/mds_audit_path.c
b/lustre/mds/mds_audit_path.c
index
ded6750
..
0e9befc
100644
(file)
--- a/
lustre/mds/mds_audit_path.c
+++ b/
lustre/mds/mds_audit_path.c
@@
-575,7
+575,7
@@
next:
item = list_entry(pos, struct name_item, link);
*namelen += strlen(item->name) + 1;
}
- OBD_ALLOC(*name, *namelen);
+ OBD_ALLOC(*name, *namelen
+ 1
);
if (*name == NULL)
rc = -ENOMEM;
out:
@@
-587,6
+587,7
@@
out:
}
list_del_init(&item->link);
OBD_FREE(item, sizeof(*item));
+ LASSERT(strlen(*name) < *namelen);
}
RETURN(rc);
}