The Samba-Bugzilla – Attachment 1240 Details for
Bug 2735
Filename mangling not occuring on control characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
look (text/plain), 1.30 KB, created by
Jeremy Allison
on 2005-05-25 12:23:14 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2005-05-25 12:23:14 UTC
Size:
1.30 KB
patch
obsolete
>Index: smbd/mangle_hash.c >=================================================================== >--- smbd/mangle_hash.c (revision 6974) >+++ smbd/mangle_hash.c (working copy) >@@ -95,6 +95,10 @@ > } > > while (*s) { >+ if (*s <= 0x1f) { >+ /* Control characters. */ >+ return NT_STATUS_UNSUCCESSFUL; >+ } > switch(*s) { > case UCS2_CHAR('\\'): > case UCS2_CHAR('/'): >Index: smbd/mangle_hash2.c >=================================================================== >--- smbd/mangle_hash2.c (revision 6974) >+++ smbd/mangle_hash2.c (working copy) >@@ -633,6 +633,11 @@ > memset(char_flags, 0, sizeof(char_flags)); > > for (i=1;i<128;i++) { >+ if (i <= 0x1f) { >+ /* Control characters. */ >+ char_flags[i] |= FLAG_ILLEGAL; >+ } >+ > if ((i >= '0' && i <= '9') || > (i >= 'a' && i <= 'z') || > (i >= 'A' && i <= 'Z')) { >Index: smbd/reply.c >=================================================================== >--- smbd/reply.c (revision 6974) >+++ smbd/reply.c (working copy) >@@ -118,6 +118,9 @@ > } > > if (!(*s & 0x80)) { >+ if (*s <= 0x1f) { >+ return NT_STATUS_OBJECT_NAME_INVALID; >+ } > switch (*s) { > case '*': > case '?': >@@ -244,6 +247,9 @@ > } > > if (!(*s & 0x80)) { >+ if (*s <= 0x1f) { >+ return NT_STATUS_OBJECT_NAME_INVALID; >+ } > *d++ = *s++; > } else { > switch(next_mb_char_size(s)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2735
: 1240