Bug 7004

Summary: grep -w str on pattern "strstr foo" will give a match.
Product: Busybox Reporter: frank chen <frank.chen2>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.22.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: chine the line position on continue case.

Description frank chen 2014-03-28 14:41:05 UTC
Created attachment 5318 [details]
chine the line position on continue case.

if you do grep -w strs on "strstr foo" will not give you match, which is right.
Comment 1 Denys Vlasenko 2014-04-02 10:17:11 UTC
>  grep -w str on pattern "strstr foo" will give a match

It is fixed in 1.22.1:

# echo "strstr foo" | busybox grep -w str
<nothing>
# busybox 2>&1 | head -1
BusyBox v1.22.1 (2014-02-01 19:25:19 CET) multi-call binary.
Comment 2 frank chen 2014-04-02 12:57:15 UTC
the patch is not in the v1.22.1 patch, and not in the release package.
Comment 3 Denys Vlasenko 2014-04-05 18:34:31 UTC
1.22.1 contains a partial fix, it requires CONFIG_EXTRA_COMPAT=y in .config file.

Current git has additional fix for non-CONFIG_EXTRA_COMPAT mode.