Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179371
b: refs/heads/master
c: a3291c1
h: refs/heads/master
i:
  179369: 013b625
  179367: 0efa694
v: v3
  • Loading branch information
Li Zefan authored and Steven Rostedt committed Jan 15, 2010
1 parent 1ea09f5 commit 02a42de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 285caad415f459f336247932b4db95a571357a02
refs/heads/master: a3291c14ecf0a995e30d993b7f2cae031de98727
5 changes: 3 additions & 2 deletions trunk/kernel/trace/trace_events_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ static int regex_match_middle(char *str, struct regex *r, int len)

static int regex_match_end(char *str, struct regex *r, int len)
{
char *ptr = strstr(str, r->pattern);
int strlen = len - 1;

if (ptr && (ptr[r->len] == 0))
if (strlen >= r->len &&
memcmp(str + strlen - r->len, r->pattern, r->len) == 0)
return 1;
return 0;
}
Expand Down

0 comments on commit 02a42de

Please sign in to comment.