Closed
Bug 206363
Opened 21 years ago
Closed 21 years ago
fix a buffer-overrun in Jamo converter
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
People
(Reporter: jshin1987, Assigned: jshin1987)
References
()
Details
(Keywords: intl)
Attachments
(1 file)
|
1.46 KB,
patch
|
smontagu
:
review+
rbs
:
superreview+
asa
:
approval1.4+
|
Details | Diff | Splinter Review |
I found a buffer-overrun in nsUnicodeToJamoTTF.cpp that was introduced during my rewrite to save some memory. This leads to a crash in some situations. I'm going to upload a fix to fill up the hole.
| Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•21 years ago
|
||
In addition to fixing the buffer overrun, I changed the name of a local variable to be compliant to the naming convention often used in Mozilla.
| Assignee | ||
Comment 2•21 years ago
|
||
Comment on attachment 123743 [details] [diff] [review] a patch Asking r/sr. This patch is acutally a one-liner : // identify the substring of aIn with values in [aOffset, aOffset + 0x100). - while ((aIn[start] & 0xff00) != aOffset) + while (start < origLen && (aIn[start] & 0xff00) != aOffset) ++start;
Attachment #123743 -
Flags: superreview?(rbs)
Attachment #123743 -
Flags: review?(smontagu)
Does this also clear this uncertainty that I had seen there earlier?
// This should never happen, but it happens under MS Windows, somehow...
if (mJamoCount > mJamosMaxLength)
{
NS_WARNING("mJamoCount > mJamoMaxLength on entering Convert()");
Reset();
}
| Assignee | ||
Comment 4•21 years ago
|
||
No, it doesn't. Actually, I guess we can safely remove that if-clause. I added it last October (in my tree) and left it there just to be safe. However, I haven't since seen warning message from that spot. Reading the code again, I don't see how the condition in the if-clause can be satisfied (well, neither could I back then).
Comment 5•21 years ago
|
||
Comment on attachment 123743 [details] [diff] [review] a patch r=smontagu
Attachment #123743 -
Flags: review?(smontagu) → review+
Comment on attachment 123743 [details] [diff] [review] a patch sr=rbs
Attachment #123743 -
Flags: superreview?(rbs) → superreview+
| Assignee | ||
Comment 7•21 years ago
|
||
Comment on attachment 123743 [details] [diff] [review] a patch Thanks for r/sr. This is to fix a buffer overrun bug that leads to a crash on some occasions. Those who never view web pages with Hangul Jamos won't be affected.
Attachment #123743 -
Flags: approval1.4?
Comment 8•21 years ago
|
||
Comment on attachment 123743 [details] [diff] [review] a patch a=asa (on behalf of drivers) for checkin to 1.4.
Attachment #123743 -
Flags: approval1.4? → approval1.4+
| Assignee | ||
Comment 9•21 years ago
|
||
checked in the fix. thank you all.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•