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-4629 libcfs: fix buffer overflow of string buffer
[fs/lustre-release.git]
/
lustre
/
include
/
lustre
/
lustre_user.h
diff --git
a/lustre/include/lustre/lustre_user.h
b/lustre/include/lustre/lustre_user.h
index
e385612
..
6a828f3
100644
(file)
--- a/
lustre/include/lustre/lustre_user.h
+++ b/
lustre/include/lustre/lustre_user.h
@@
-498,8
+498,8
@@
static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen)
strncpy(buf, uuid, buflen - 1);
buf[buflen - 1] = '\0';
p = strrchr(buf, '-');
-
if (p
)
- *p = '\0';
+
if (p != NULL
)
+
*p = '\0';
}
/* printf display format