Project

General

Profile

Actions

Bug #2211

closed

Bug #1450: Illumos should be buildable with GCC4

undefined order of operations in kadmin GUI native code

Added by Rich Lowe over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2012-02-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

the kadmin GUI does this:

-    for (i = 0; i < num_keysalts; grp[i] = i++);

The value of 'i' in the 3rd clause is undefined, there's no sequence point separating the use as an index from the increment.

We should instead do:

+    for (i = 0; i < num_keysalts; i++)
+        grp[i] = i;

Actions

Also available in: Atom PDF