summaryrefslogtreecommitdiff
path: root/onlineupdate/source/libmar
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-09 13:12:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-10 12:13:27 +0100
commitcb164b1d115cb848abfba934d44a4d41ff84c6fe (patch)
tree7104ab46b9f998b2c91c8974b3c34d1f076938c1 /onlineupdate/source/libmar
parent85e14be20f1ba961ee5f5014a845e044ce8db39b (diff)
cppcheck: arrayIndexThenCheck
Change-Id: I66dc4dd095d4e1a9d963b1c2c6a99b16d9f9bf61
Diffstat (limited to 'onlineupdate/source/libmar')
-rw-r--r--onlineupdate/source/libmar/sign/nss_secutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/onlineupdate/source/libmar/sign/nss_secutil.c b/onlineupdate/source/libmar/sign/nss_secutil.c
index ac8954ceb953..01aa5734e0a2 100644
--- a/onlineupdate/source/libmar/sign/nss_secutil.c
+++ b/onlineupdate/source/libmar/sign/nss_secutil.c
@@ -158,7 +158,7 @@ SECU_FilePasswd(PK11SlotInfo *slot, PRBool retry, void *arg)
int phraseLen;
/* handle the Windows EOL case */
- while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++;
+ while (i < nb && phrases[i] != '\r' && phrases[i] != '\n') i++;
/* terminate passphrase */
phrases[i++] = '\0';
/* clean up any EOL before the start of the next passphrase */