#761 closed defect (fixed)
Code uses strstr() to test for options
| Reported by: | Owned by: | Paul Price | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | config | Version: | 0.10.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
In various places (e.g. pmConceptsStandard) the psModules code compares strings by
calling strstr. This isn't really good enough -- for example, if the options were
"AAA NOTBBB"
then
str(options, "BBB") would return true
We probably need a utility function to look for white-space (or beginning/end of string)
delimited words. Calling strtok() would probably be overkill.
Change History (3)
comment:1 by , 20 years ago
| Owner: | changed from to |
|---|
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Good catch.
I now split the string (psStringSplit), and check each word individually using
strcasecmp, setting boolean flags. This is done before the main formatting part.