Status
()
People
(Reporter: vicamo, Assigned: vicamo)
Tracking
Firefox Tracking Flags
(Not tracked)
Details
Attachments
(2 attachments, 1 obsolete attachment)
1.88 KB,
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
14.92 KB,
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
Test scripts were intended to be part of bug 729876, but is now separated as another minor issue to land the major function a.s.a.p.
Updated•7 years ago
|
Blocks: 729876
Component: General → DOM: Device Interfaces
OS: Android → Gonk
Product: Boot2Gecko → Core
QA Contact: general → device-interfaces
(Assignee) | ||
Updated•7 years ago
|
Updated•7 years ago
|
(Assignee) | ||
Comment 1•7 years ago
|
||
Created attachment 603323 [details] [diff] [review] WIP V1 add tests for several GsmPDUHelper member functions.
(Assignee) | ||
Comment 2•7 years ago
|
||
Created attachment 603612 [details] [diff] [review] Part 1: fix removing redundent tailing char fix a bug found with test scripts in part 2
Attachment #603323 -
Attachment is obsolete: true
Attachment #603612 -
Flags: review?(philipp)
(Assignee) | ||
Comment 3•7 years ago
|
||
Created attachment 603619 [details] [diff] [review] Part2: Add test scripts
Attachment #603619 -
Flags: review?(philipp)
(Assignee) | ||
Comment 4•7 years ago
|
||
There might be other potential errors in GsmPDUHelper.calculateUserDataLength(): 01 calculateUserDataLength: function calculateUserDataLength(options) { 02 ... 03 for (...) { 04 ... 05 // Calculate full user data length, note the extra byte is for header len 06 let userDataLength = length + (headerLen ? headerLen + 1 : 0); 07 ... 08 if (userDataLength <= options.body.length) { 09 // Found minimum user data length already 10 return; 11 } 12 } 13 ... 14 } In line 6, the unit of `headerLen` is octet, while that of `length` is septet. Under some situations, the result may vary. In line 8~10, when it comes with a string with numerous ineffective characters like <escape>, the calculated encoded string length may be much less than options.body.length, and it is therefore possible for another encoding to have an even shorter result. For example, an input string of length 10 might get calculated cost 8 with several characters encoded with single shift mechanism. But another encoding might get cost 5 with all characters encoded with locking shift mechanism. This should be a minor issue because users cannot key-in \uffff and \ufffe, which are internally assigned to ineffective characters <escape> and <resctl>.
Comment 5•7 years ago
|
||
Comment on attachment 603619 [details] [diff] [review] Part2: Add test scripts Sweet!
Attachment #603619 -
Flags: review?(philipp) → review+
Comment 6•7 years ago
|
||
Comment on attachment 603612 [details] [diff] [review] Part 1: fix removing redundent tailing char Good catch, and also nice work on that comment!
Attachment #603612 -
Flags: review?(philipp) → review+
Comment 7•7 years ago
|
||
(In reply to Vicamo Yang from comment #4) > There might be other potential errors in > GsmPDUHelper.calculateUserDataLength(): > <snip> Good sleuthing. Please file follow-up bug(s). Thanks!
Comment 8•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a4415019a57a https://hg.mozilla.org/mozilla-central/rev/453d5c733caa
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•