projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ec7927
)
Don't potentially dereference NULL in net/dcb/dcbnl.c:dcbnl_getapp()
author
Jesper Juhl
<jj@chaosbits.net>
Thu, 10 Feb 2011 11:57:16 +0000
(11:57 +0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 13 Feb 2011 19:21:14 +0000
(11:21 -0800)
nla_nest_start() may return NULL. If it does then we'll blow up in
nla_nest_end() when we dereference the pointer.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dcb/dcbnl.c
patch
|
blob
|
blame
|
history
diff --git
a/net/dcb/dcbnl.c
b/net/dcb/dcbnl.c
index 712ca026040a518e3719dee17e7ebc1de181d696..d5074a5672899a9d85adf0f20b363533fa8db9b5 100644
(file)
--- a/
net/dcb/dcbnl.c
+++ b/
net/dcb/dcbnl.c
@@
-626,6
+626,9
@@
static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb,
dcb->cmd = DCB_CMD_GAPP;
app_nest = nla_nest_start(dcbnl_skb, DCB_ATTR_APP);
+ if (!app_nest)
+ goto out_cancel;
+
ret = nla_put_u8(dcbnl_skb, DCB_APP_ATTR_IDTYPE, idtype);
if (ret)
goto out_cancel;