Closed Bug 1229736 Opened 8 years ago Closed 8 years ago

[Coverity 1202779] Avoid division by zero

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: paul.bignier, Assigned: paul.bignier)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1202779)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20151104125556

Steps to reproduce:

Coverity's CID: 1202779
Component: Untriaged → Libraries
Product: Firefox → NSS
Version: 38 Branch → trunk
Keywords: coverity
Whiteboard: CID 1202779
Assignee: nobody → paul.bignier
Blocks: nss-coverity
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: Avoid division by zero → [Coverity 1202779] Avoid division by zero
Attachment #8694680 - Flags: review?(brian)
Attachment #8694680 - Flags: review?(brian) → review?(kaie)
Can a signed<->unsigned conversion ever turn a non-zero value into zero?
Comment on attachment 8694680 [details] [diff] [review]
0001-Avoid-division-by-zero.patch

r=kaie

Given that other error paths in this function don't bother to call PORT_SetError, it shouldn't be necessary to call PORT_SetError(SEC_ERROR_INVALID_ARGS);
Attachment #8694680 - Flags: review?(kaie) → review+
https://hg.mozilla.org/projects/nss/rev/3fc655349061
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: