git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 2.0 rc7
[linux-2.6.git]
/
net
/
irda
/
wrapper.c
diff --git
a/net/irda/wrapper.c
b/net/irda/wrapper.c
index
c96074d
..
87130c1
100644
(file)
--- a/
net/irda/wrapper.c
+++ b/
net/irda/wrapper.c
@@
-133,7
+133,11
@@
int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
* bufsize-5 since the maximum number of bytes that can be
* transmitted after this point is 5.
*/
* bufsize-5 since the maximum number of bytes that can be
* transmitted after this point is 5.
*/
- ASSERT(n < (buffsize-5), return n;);
+ if(n >= (buffsize-5)) {
+ IRDA_ERROR("%s(), tx buffer overflow (n=%d)\n",
+ __FUNCTION__, n);
+ return n;
+ }
n += stuff_byte(skb->data[i], tx_buff+n);
fcs.value = irda_fcs(fcs.value, skb->data[i]);
n += stuff_byte(skb->data[i], tx_buff+n);
fcs.value = irda_fcs(fcs.value, skb->data[i]);
@@
-381,7
+385,7
@@
async_unwrap_ce(struct net_device *dev,
break;
case LINK_ESCAPE:
break;
case LINK_ESCAPE:
- WARNING("%s: state not defined\n", __FUNCTION__);
+
IRDA_
WARNING("%s: state not defined\n", __FUNCTION__);
break;
case BEGIN_FRAME:
break;
case BEGIN_FRAME: