Closed
Bug 229297
Opened 21 years ago
Closed 21 years ago
lib/crmf/crmfdec.c: conversion from 'double ' to 'long ', possible loss of data
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.10
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file)
623 bytes,
patch
|
rrelyea
:
review+
julien.pierre
:
superreview+
|
Details | Diff | Splinter Review |
When compiling lib/crmf/crmfdec.c, MSVC issues the
following warning:
cl -FoWIN954.0_DBG.OBJ/crmfdec.obj -c -Od -Z7 -MD -W3 -nologo -DXP_PC -DDEBUG -D
_DEBUG -UNDEBUG -DDEBUG_wtc -DWIN32 -D_WINDOWS -D_X86_ -DWIN95 -I../../../../dis
t/WIN954.0_DBG.OBJ/include -I../../../../dist/public/nss -I../../../../dist/pri
vate/nss G:/nss-tip/mozilla/security/nss/lib/crmf/crmfdec.c
crmfdec.c
G:/nss-tip/mozilla/security/nss/lib/crmf/crmfdec.c(349) : warning C4244: '=' : c
onversion from 'double ' to 'long ', possible loss of data
Assignee | ||
Comment 1•21 years ago
|
||
Use the equivalent integer arithmetic.
Assignee | ||
Updated•21 years ago
|
Attachment #137899 -
Flags: superreview?(jpierre)
Attachment #137899 -
Flags: review?(rrelyea0264)
Comment 2•21 years ago
|
||
Comment on attachment 137899 [details] [diff] [review]
Proposed patch
This patch fixes the compiler warning and is equivalent to the old code. I'm
not sure if the guesstimate is the correct thing to do, but I don't know too
much about CRMF requests size.
Attachment #137899 -
Flags: superreview?(jpierre) → superreview+
Comment 3•21 years ago
|
||
Comment on attachment 137899 [details] [diff] [review]
Proposed patch
A quick look indicates that we should also increase arenaSize by sizeof(
CRMFCertReqMessages).
This isn't an issue since arenaSize is the arena page size, If the value is to
small, the code still functions, only more slowly.
Attachment #137899 -
Flags: review?(rrelyea0264) → review+
Assignee | ||
Comment 4•21 years ago
|
||
Patch checked into the trunk.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.10
Comment 5•20 years ago
|
||
Setting priorities on unprioritized bugs resolved fixed for NSS 3.10.
Setting this to P3, since it was motivated only as warning reduction.
Priority: -- → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•