Closed Bug 1617387 Opened 5 years ago Closed 5 years ago

secsign.c fix compiler warning

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jeanluc.bonnafoux, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

Compiling NSS using Mozilla trunk code, compiler raises warning line 730:

/* The specified salt length is too long */
if (saltLength > modBytes - hashLength - 2) {
PORT_SetError(SEC_ERROR_INVALID_ARGS);
return NULL;
}
This is beacause |modBytes| and |hashLength| are int variables whereas |saltLength| is unsigned long.

Actual results:

Code compiles but there is a warning.

Expected results:

Code should compile without warning

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: