IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#761 closed defect (fixed)

Code uses strstr() to test for options

Reported by: rhl@… 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 Paul Price, 20 years ago

Owner: changed from David.Robbins@… to Paul Price

comment:2 by Paul Price, 20 years ago

Resolution: fixed
Status: newclosed

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.

comment:3 by Paul Price, 20 years ago

Forgot to add: fixed in CVS head.

Note: See TracTickets for help on using tickets.