Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-15130 nrs: null pointer dereference in nrs_tbf_id_parse
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
libcfs_string.c
diff --git
a/libcfs/libcfs/libcfs_string.c
b/libcfs/libcfs/libcfs_string.c
index
5549417
..
7ba00df
100644
(file)
--- a/
libcfs/libcfs/libcfs_string.c
+++ b/
libcfs/libcfs/libcfs_string.c
@@
-151,6
+151,7
@@
cfs_gettok(struct cfs_lstr *next, char delim, struct cfs_lstr *res)
/* there is no the delimeter in the string */
end = next->ls_str + next->ls_len;
next->ls_str = NULL;
+ next->ls_len = 0;
} else {
next->ls_str = end + 1;
next->ls_len -= (end - res->ls_str + 1);