Closed
Bug 238455
Opened 21 years ago
Closed 21 years ago
warning C4244: 'argument' : conversion from 'PRInt64' to 'size_t', possible loss of data
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
M1
People
(Reporter: timeless, Assigned: timeless)
Details
(Whiteboard: [sg:nse])
Attachments
(1 file)
1.54 KB,
patch
|
roc
:
review+
dveditz
:
superreview+
|
Details | Diff | Splinter Review |
tip from now
r:/mozilla\widget\src\xpwidgets\nsTransferable.cpp(253) : warning
C4244: 'argument' : conversion from 'PRInt64' to 'size_t', possible loss of data
r:/mozilla\widget\src\xpwidgets\nsTransferable.cpp(264) : warning
C4244: 'argument' : conversion from 'PRInt64' to 'PRUint32', possible loss of
data
r:/mozilla\widget\src\xpwidgets\nsTransferable.cpp(268) : warning C4244: '=' :
conversion from 'PRInt64' to 'PRUint32', possible loss of data
r:/mozilla\widget\src\xpwidgets\nsTransferable.cpp(269) : warning
C4244: 'argument' : conversion from 'PRInt64' to 'PRUint32', possible loss of
data
PRInt64 may be a struct, and nsMemory only takes a 32bit creature. So this is
silly
Attachment #144644 -
Flags: superreview?(dveditz+bmo)
Attachment #144644 -
Flags: review?(dveditz+bmo)
Comment 2•21 years ago
|
||
Comment on attachment 144644 [details] [diff] [review]
limit to 32bits
Not sure who gives r= in widget these days but it's not me. Despot says roc,
who conveniently can see security bugs.
I don't think this is a security bug: nsIInputStream::Read truncates the
filesize the same way as nsMemory so I don't see how it could overrun. Plus,
even if it were exploitable, it's hard to imagine that an attack that depends
on first getting a >4Gb file into someone's cache at today's transfer speeds is
all that feasible.
>+ if ( NS_SUCCEEDED(rv) && *aDataLen == size) {
>+ *aDataLen = size;
If *aDataLen already == size why assign? Emphatic but unnecessary.
sr=dveditz
Attachment #144644 -
Flags: superreview?(dveditz+bmo)
Attachment #144644 -
Flags: superreview+
Attachment #144644 -
Flags: review?(roc)
Attachment #144644 -
Flags: review?(dveditz+bmo)
Attachment #144644 -
Flags: review?(roc) → review+
mozilla/widget/src/xpwidgets/nsTransferable.cpp 1.61
Group: security
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → M1
Updated•21 years ago
|
Whiteboard: [sg:nse]
You need to log in
before you can comment on or make changes to this bug.
Description
•