The Samba-Bugzilla – Attachment 6086 Details for
Bug 7816
get_tmpname() can create invalid UTF-8 filenames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A simple heuristic that tries to avoid split high-bit characters
high-bit-trimming.patch (text/plain), 495 bytes, created by
Wayne Davison
on 2010-11-24 13:32:17 UTC
(
hide
)
Description:
A simple heuristic that tries to avoid split high-bit characters
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2010-11-24 13:32:17 UTC
Size:
495 bytes
patch
obsolete
>--- a/receiver.c >+++ b/receiver.c >@@ -129,6 +129,13 @@ int get_tmpname(char *fnametmp, const char *fname, BOOL make_unique) > added = maxname - 1; > suf = fnametmp + length + added; > >+ /* Trim any dangling high-bit chars if the first-trimmed char (if any) is >+ * also a high-bit char, just in case we cut into a multi-byte sequence. */ >+ if (f[added] & (char)0x80) { >+ while (suf[-1] & (char)0x80) >+ suf--; >+ } >+ > if (make_unique) { > static unsigned counter_limit; > unsigned counter;
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 7816
: 6086