Merge lp://staging/~jamesodhunt/libnih/fix-for-bug-834813 into lp://staging/libnih
Proposed by
James Hunt
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp://staging/~jamesodhunt/libnih/fix-for-bug-834813 | ||||
Merge into: | lp://staging/libnih | ||||
Diff against target: |
440 lines (+396/-1) 3 files modified
ChangeLog (+8/-0) nih/string.c (+8/-1) nih/tests/test_string.c (+380/-0) |
||||
To merge this branch: | bzr merge lp://staging/~jamesodhunt/libnih/fix-for-bug-834813 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott James Remnant | Pending | ||
Review via email: mp+73573@code.staging.launchpad.net |
This proposal supersedes a proposal from 2011-08-31.
This proposal has been superseded by a proposal from 2011-08-31.
Description of the change
Sigh... Re-merged with no conflicts this time :)
* ChangeLog: updated.
* nih/string.c (nih_str_split): Fixes to avoid over-running
input string and also returning an empty string array entry
when repeat is true (LP: #834813).
* nih/tests/
tests for nih_str_split().
To post a comment you must log in.
"str && *str" shouldn't be necessary, this function already asserts "str != NULL"
Have you checked other uses of strchr() in the code, I probably make the same mistake all over the place - believing it would return NULL if given '\0'
I'd like that final if() cleaned up, it doesn't make sense what you're doing there - perhaps splitting out some informationally named temporary variables and checking those would make more sense, or using some other method