patchmldonkey, a multi-networks file-sharing client - Patches: patch #5123, Fix...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5123: Fix Invalid_argument("UTF8.length") bug in HTML, down-/uploaders

Submitter:  spiralvoice <spiralvoice>
Submitted:  Tue 23 May 2006 05:35:52 PM UTC
   
 
Category:  Bug fixes Priority:  5 - Normal
Status:  Done Assigned to:  None
Open/Closed:  Closed

Thu 25 May 2006 06:10:15 AM UTC, comment #2: 

Hi Spiralvoice,

Why checking utf8_length of 'str'. You are not sure that 'str' is utf8 encoded. Only 'name' is utf8 encoded, so it won't raise any error if you proceed like this:

let shorten str limit =
 (* TODO: we should change all strings to utf8 when
    they come into the core instead. *)
 let name = Charset.to_utf8 ( String.escaped ) str in
 let len = Charset.utf8_length name in
 let max_len = maxi limit 10 in
 if len > max_len then
   let prefix = String.sub name 0 (max_len - 7) in

just a proposal...
regards

su_blanc <su_blanc>
Group Member
Tue 23 May 2006 05:39:07 PM UTC, comment #1: 

Applied 2006/05/23

spiralvoice <spiralvoice>
Group administrator
Tue 23 May 2006 05:35:52 PM UTC, original submission:  


spiralvoice <spiralvoice>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10036:  utf8fix.patch added by spiralvoice (838B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-05-23 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2006-05-23 spiralvoice Attached File- Added utf8fix.patch, #10036

Back to the top

Powered by Savane 3.13-aa77.
Corresponding source code