Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108572959
D41229.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
597 B
Referenced Files
None
Subscribers
None
D41229.diff
View Options
diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c
--- a/sys/netsmb/smb_rq.c
+++ b/sys/netsmb/smb_rq.c
@@ -425,12 +425,18 @@
smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
struct mdchain *mdp)
{
- struct mbuf *m, *m0;
+ struct mbuf *m0;
int len;
+ len = m_length(mtop, NULL);
+ if (offset + count > len)
+ return (EPROTO);
+
m0 = m_split(mtop, offset, M_WAITOK);
- len = m_length(m0, &m);
- m->m_len -= len - count;
+ if (len != offset + count) {
+ len -= offset + count;
+ m_adj(m0, -len);
+ }
if (mdp->md_top == NULL) {
md_initm(mdp, m0);
} else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 12:24 PM (1 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16196048
Default Alt Text
D41229.diff (597 B)
Attached To
Mode
D41229: netsmb: Add bounds checking to smb_t2_placedata
Attached
Detach File
Event Timeline
Log In to Comment