The Samba-Bugzilla – Attachment 48 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]
Don't let invalid byte sequences invalidate the conversion
charset-conversion-eilseq.patch (text/plain), 971 bytes, created by
Steve Langasek
on 2003-07-12 13:49:16 UTC
(
hide
)
Description:
Don't let invalid byte sequences invalidate the conversion
Filename:
MIME Type:
Creator:
Steve Langasek
Created:
2003-07-12 13:49:16 UTC
Size:
971 bytes
patch
obsolete
>Index: source/lib/charcnv.c >=================================================================== >RCS file: /cvsroot/samba/source/lib/charcnv.c,v >retrieving revision 1.55.2.28 >diff -u -r1.55.2.28 charcnv.c >--- source/lib/charcnv.c 3 Jul 2003 19:11:28 -0000 1.55.2.28 >+++ source/lib/charcnv.c 12 Jul 2003 20:45:27 -0000 >@@ -254,9 +254,18 @@ > } > i_len = srclen; > o_len = destlen; >- retval = smb_iconv(descriptor, >- &inbuf, &i_len, >- &outbuf, &o_len); >+ do { >+ retval = smb_iconv(descriptor, >+ &inbuf, &i_len, >+ &outbuf, &o_len); >+ inbuf++; i_len--; >+ if (i_len <= 0) >+ break; >+ } while (retval == (size_t)-1 && (errno == EINVAL || errno == EILSEQ)); >+ /* Skip over any invalid input bytes; this should never happen with >+ UCS-2 unless we're on the second to last byte, so we shouldn't >+ have to worry about being out of phase on UCS2 input. */ >+ > if(retval == (size_t)-1) { > const char *reason="unknown error"; > switch(errno) {
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