mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns
NULL instead of the "haystack" value (aka big) Submitted by: pho Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
effc369887
commit
21a9353bfd
1 changed files with 5 additions and 0 deletions
|
|
@ -75,8 +75,13 @@ ATF_TC_HEAD(memmem_basic, tc)
|
|||
ATF_TC_BODY(memmem_basic, tc)
|
||||
{
|
||||
|
||||
#if defined(__darwin__) || defined(__FreeBSD__)
|
||||
expect(memmem(b2, lb2, p0, lp0) == NULL);
|
||||
expect(memmem(b0, lb0, p0, lp0) == NULL);
|
||||
#else
|
||||
expect(memmem(b2, lb2, p0, lp0) == b2);
|
||||
expect(memmem(b0, lb0, p0, lp0) == b0);
|
||||
#endif
|
||||
expect(memmem(b0, lb0, p1, lp1) == NULL);
|
||||
expect(memmem(b1, lb1, p1, lp1) == NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue