fix comments to be non-recursive

Signed-Off-By: Kees Cook <kees.cook@canonical.com>
This commit is contained in:
John Johansen 2009-07-24 07:34:30 +00:00
parent 627c044e4d
commit c4c430dcd0

View file

@ -186,26 +186,25 @@ static pattern_t convert_aaregex_to_pcre(const char *aare, int anchor,
} else { } else {
if ((dptr > pcre) && *(dptr - 1) == '/') { if ((dptr > pcre) && *(dptr - 1) == '/') {
#if 0 #if 0
/* handle comment containing use // handle comment containing use
* of C comment characters // of C comment characters
* /* /*/ and /** to describe paths // /* /*/ and /** to describe paths
* //
* modify what is emitted for * and ** // modify what is emitted for * and **
* when used as the only path // when used as the only path
* component // component
* ex. // ex.
* /* /*/ /**/ /** // /* /*/ /**/ /**
* this prevents these expressions // this prevents these expressions
* from matching directories or // from matching directories or
* invalid paths // invalid paths
* in these case * and ** must // in these case * and ** must
* match at least 1 character to // match at least 1 character to
* get a valid path element. // get a valid path element.
* ex. // ex.
* /foo/* -> should not match /foo/ // /foo/* -> should not match /foo/
* /foo/*bar -> should match /foo/bar // /foo/*bar -> should match /foo/bar
* /*/foo -> should not match //foo // /*/foo -> should not match //foo
*/
#endif #endif
const char *s = sptr; const char *s = sptr;
while (*s == '*') while (*s == '*')