Merge lp://staging/~wlxing/ecryptfs/lp1695767 into lp://staging/ecryptfs
Proposed by
Jason Xing
Status: | Merged |
---|---|
Merge reported by: | Tyler Hicks |
Merged at revision: | not available |
Proposed branch: | lp://staging/~wlxing/ecryptfs/lp1695767 |
Merge into: | lp://staging/ecryptfs |
Diff against target: |
15 lines (+5/-0) 1 file modified
src/libecryptfs/decision_graph.c (+5/-0) |
To merge this branch: | bzr merge lp://staging/~wlxing/ecryptfs/lp1695767 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tyler Hicks | Approve | ||
Jason Xing (community) | Needs Resubmitting | ||
Review via email: mp+325079@code.staging.launchpad.net |
Description of the change
Adding just six lines to test whether the value of "num_transitions" is set to zero or not because it stands for how many options user could choose, we can then easily prevent infinite loop and prompt user with error messages. That is to say, if set to zero, that means that eCryptfs goes wrong because there is no selection for user to choose.
To post a comment you must log in.
Hi Jason - Thanks for the patch!
After reviewing the function that you modified, I think the check for transitions being zero can be done much higher. Around line transitions is already being checked for being
node->num_
465, where node->num_
equal to one, should work fine and then you can drop the call to free
the "prompt" string.
Also, a few comments on patch style...
1) Please put the description of the patch into the commit message
itself instead of into the pull request description. Someone
researching why this change was made will typically look into the bzr
log history but may not look at the Launchpad pull request.
2) The correct syntax for referencing a Launchpad bug is (LP: #1695767).
The syntax used in the commit message includes an unnecessary "lp".
3) The patch includes a space character between the third and fourth tab
characters on the line that rc is being assigned.