The Samba-Bugzilla – Attachment 47 Details for
Bug 203
some multibyte filenames cause smbd crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to handle invalid multibyte strings gracefully
bug203-charcnv.c.patch (text/plain), 875 bytes, created by
Tim Potter
on 2003-07-10 18:16:05 UTC
(
hide
)
Description:
Patch to handle invalid multibyte strings gracefully
Filename:
MIME Type:
Creator:
Tim Potter
Created:
2003-07-10 18:16:05 UTC
Size:
875 bytes
patch
obsolete
>Index: lib/charcnv.c >=================================================================== >RCS file: /data/cvs/samba/source/lib/charcnv.c,v >retrieving revision 1.55.2.28 >diff -u -r1.55.2.28 charcnv.c >--- lib/charcnv.c 3 Jul 2003 19:11:28 -0000 1.55.2.28 >+++ lib/charcnv.c 11 Jul 2003 01:10:02 -0000 >@@ -269,9 +269,16 @@ > reason="Illegal multibyte sequence"; > break; > } >- DEBUG(0,("Conversion error: %s(%s)\n",reason,inbuf)); >- /* smb_panic(reason); */ >- return (size_t)-1; >+ DEBUG(1,("Conversion error: %s(%s)\n",reason,inbuf)); >+ >+ /* For EINVAL and EILSEQ return the unconverted data. >+ Returning (size_t)-1 here soon causes smbd to panic, >+ and so Samba can be DoS'ed by creating a file with >+ an invalid/incomplete multibyte sequence. */ >+ >+ SAFE_FREE(ob); >+ *dest = memdup(src, srclen); >+ return srclen; > } > > destlen = destlen - o_len;
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 203
: 47 |
48