https://bugs.kde.org/show_bug.cgi?id=454040
--- Comment #4 from Andreas Arnez <ar...@linux.ibm.com> --- (In reply to Mark Wielaard from comment #2) > Looks good and fixes the issue for me. > I think the for loop could/should be from i = 1. needle being zero sized > (nlen == 0) and n[0] == h[0] (hh != n0) has already been checked above. Thanks, you're right. Also, the hh variable is only accessed once and doesn't improve readability. I'll attach an updated patch. (In reply to Mark Wielaard from comment #3) > Created attachment 149008 [details] > Add memcheck memmem vgtest > > I wrote a testcase that fails before the patch (on s390x) and succeeds > afterwards. It would be nice to add it so we check the same isn't an issue > on other arches and to test our own memmem intercept. Great! Do we also want to check cases where memcheck is expected to complain about the use of uninitialized values in memmem? -- You are receiving this mail because: You are watching all bug changes.