Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5cd187fd
Commit
5cd187fd
authored
Jul 10, 2003
by
Jean Tourrilhes
Committed by
Linus Torvalds
Jul 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IrDA] irtty leaks
<Stanford checker> o [CORRECT] fix two additional potential skb leaks in IrTTP.
parent
e7ee0535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
net/irda/irttp.c
net/irda/irttp.c
+3
-2
No files found.
net/irda/irttp.c
View file @
5cd187fd
...
@@ -1094,7 +1094,8 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
...
@@ -1094,7 +1094,8 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
* Check that the client has reserved enough space for
* Check that the client has reserved enough space for
* headers
* headers
*/
*/
ASSERT
(
skb_headroom
(
userdata
)
>=
TTP_MAX_HEADER
,
return
-
1
;);
ASSERT
(
skb_headroom
(
userdata
)
>=
TTP_MAX_HEADER
,
{
dev_kfree_skb
(
tx_skb
);
return
-
1
;
}
);
}
}
/* Initialize connection parameters */
/* Initialize connection parameters */
...
@@ -1123,7 +1124,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
...
@@ -1123,7 +1124,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
/* SAR enabled? */
/* SAR enabled? */
if
(
max_sdu_size
>
0
)
{
if
(
max_sdu_size
>
0
)
{
ASSERT
(
skb_headroom
(
tx_skb
)
>=
(
TTP_MAX_HEADER
+
TTP_SAR_HEADER
),
ASSERT
(
skb_headroom
(
tx_skb
)
>=
(
TTP_MAX_HEADER
+
TTP_SAR_HEADER
),
return
-
1
;
);
{
dev_kfree_skb
(
tx_skb
);
return
-
1
;
}
);
/* Insert SAR parameters */
/* Insert SAR parameters */
frame
=
skb_push
(
tx_skb
,
TTP_HEADER
+
TTP_SAR_HEADER
);
frame
=
skb_push
(
tx_skb
,
TTP_HEADER
+
TTP_SAR_HEADER
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment