Closed
Bug 62802
Opened 24 years ago
Closed 24 years ago
potential overflow (PRUint32 -> PRInt32) in copy_string (nsAlgorithm.h)
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
INVALID
People
(Reporter: jag+mozbugs, Assigned: jag+mozbugs)
Details
Attachments
(1 file)
763 bytes,
patch
|
Details | Diff | Splinter Review |
In copy_string in nsAlgorithm.h: PRUint32 count_copied = PRUint32(sink_traits::write(result, source_traits::read(first), source_traits::readable_distance(first, last))); The return value of |sink_traits::write(...)| is a PRUint32, |count_copied| should be PRUint32.
Assignee | ||
Comment 1•24 years ago
|
||
Since nsCharSinkTraits::write already returns a PRUint32, shouldn't you drop the cast?
And what happens if the difference_type of the InputIterator is PRInt32? What bug is this fixing?
Assignee | ||
Comment 4•24 years ago
|
||
Hrm, seeing how advance takes PRInt32 (or equivalent), this patch is bogus. Marking invalid.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Updated•3 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•