| Summary: | EXPAND_MAX_KEYS in percent_expand is actually (EXPAND_MAX_KEYS - 1) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Jan Pechanec <Jan.Pechanec> | ||||
| Component: | Miscellaneous | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | minor | CC: | djm | ||||
| Priority: | P4 | ||||||
| Version: | 5.2p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Solaris | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 1626 | ||||||
| Attachments: |
|
||||||
patch applied, will be in openssh-5.4 With the release of 5.4p1, this bug is now considered closed. |
Created attachment 1607 [details] suggested patch it may be a nit picking: EXPAND_MAX_KEYS, as any MAX macro, suggests that we can have up to EXPAND_MAX_KEYS keys. That's not true since if we reach the maximum, the following test bails out: if (num_keys >= EXPAND_MAX_KEYS) fatal("percent_expand: too many keys"); it's not a problem here since 16 becomes 15 which is still large enough but the issue is there anyway. I'm attaching a patch. In the patch changes, two "==" strings can be changed to ">=" if you feel it's better in terms of possible future updates. However, "==" is enough there.