Skip to content

Commit 577ac87

Browse files
committed
refine URINGOP parsing to only increment if strstr found something
1 parent 365ea5d commit 577ac87

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/ausearch-parse.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,11 @@ static int parse_syscall(lnode *n, search_items *s)
544544
}
545545
// get syscall
546546
if (n->type == AUDIT_SYSCALL) {
547-
str = strstr(term, "syscall=");
548-
ptr = str + 8;
547+
if ((str = strstr(term, "syscall=")))
548+
ptr = str + 8;
549549
} else if (n->type == AUDIT_URINGOP) { // or uring_op
550-
str = strstr(term, "uring_op=");
551-
ptr = str + 9;
550+
if ((str = strstr(term, "uring_op=")))
551+
ptr = str + 9;
552552
s->arch = MACH_IO_URING;
553553
} else
554554
str = NULL; // unimplemented type

0 commit comments

Comments
 (0)