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
/
util
/
string.c
diff --git
a/libcfs/libcfs/util/string.c
b/libcfs/libcfs/util/string.c
index
9e92339
..
700f002
100644
(file)
--- a/
libcfs/libcfs/util/string.c
+++ b/
libcfs/libcfs/util/string.c
@@
-84,6
+84,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);