projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b2aa03
)
[CIFS] potential NULL dereference in parse_DFS_referrals()
author
Steve French
<sfrench@us.ibm.com>
Mon, 31 Aug 2009 15:27:26 +0000
(15:27 +0000)
committer
Steve French
<sfrench@us.ibm.com>
Mon, 31 Aug 2009 15:27:26 +0000
(15:27 +0000)
memory allocation may fail, prevent a NULL dereference
Pointed out by Roel Kluin
CC: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifssmb.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/cifs/cifssmb.c
b/fs/cifs/cifssmb.c
index 1866bc2927d4f376182e98e71182fcff345f0a71..5f0b80d39923d0236b8a4b42b0377db02e27680a 100644
(file)
--- a/
fs/cifs/cifssmb.c
+++ b/
fs/cifs/cifssmb.c
@@
-3961,6
+3961,10
@@
parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
if (is_unicode) {
__le16 *tmp = kmalloc(strlen(searchName)*2 + 2,
GFP_KERNEL);
+ if (tmp == NULL) {
+ rc = -ENOMEM;
+ goto parse_DFS_referrals_exit;
+ }
cifsConvertToUCS((__le16 *) tmp, searchName,
PATH_MAX, nls_codepage, remap);
node->path_consumed = cifs_ucs2_bytes(tmp,