Closed Bug 333293 Opened 14 years ago Closed 14 years ago

UMR in nsAccessibleText::GetCurrectOffset prevChar if aOffset <= 0

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: ginnchen+exoracle)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

found by coverity
Assignee: aaronleventhal → eh
Blocks: fox2access
I need a scenario or recipe for reproducing this bug, so that I can be sure I've fixed it.  

Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
Attachment #222140 - Flags: review?(aaronleventhal)
Comment on attachment 222140 [details] [diff] [review]
patch

If aOffset < 0 we still call GetCharacterAtOffset().

Shouldn't we just return an error in that case? At least there should be an assertion.

Also, while you're here can you change "Currect" to "Current" since "Currect" is not a word? :)
Attachment #222140 - Flags: review?(aaronleventhal) → review-
Attached patch patch v2Splinter Review
add an assertion; fix misspelling and compiler warnings
Assignee: eh → ginn.chen
Attachment #222140 - Attachment is obsolete: true
Attachment #222301 - Flags: review?(aaronleventhal)
Attachment #222301 - Flags: review?(aaronleventhal) → review+
Attachment #222301 - Flags: superreview?(roc)
Attachment #222301 - Flags: superreview?(roc) → superreview+
Checking in nsAccessibleText.cpp;
/cvsroot/mozilla/accessible/src/atk/nsAccessibleText.cpp,v  <--  nsAccessibleText.cpp
new revision: 1.31; previous revision: 1.30
done
Checking in nsAccessibleText.h;
/cvsroot/mozilla/accessible/src/atk/nsAccessibleText.h,v  <--  nsAccessibleText.h
new revision: 1.8; previous revision: 1.7
done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attachment #222301 - Flags: approval-branch-1.8.1?(aaronleventhal)
Attachment #222301 - Flags: approval-branch-1.8.1?(aaronleventhal) → approval-branch-1.8.1+
Checking in nsAccessibleText.cpp;
/cvsroot/mozilla/accessible/src/atk/nsAccessibleText.cpp,v  <--  nsAccessibleText.cpp
new revision: 1.24.8.3; previous revision: 1.24.8.2
done
Checking in nsAccessibleText.h;
/cvsroot/mozilla/accessible/src/atk/nsAccessibleText.h,v  <--  nsAccessibleText.h
new revision: 1.6.58.1; previous revision: 1.6
done
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.