Hi ports@,

I use glimpse heavily, although I know it's old... I'm used to it, I
guess.  It just dumped core for me under -current and the reason was
memcpy/memmove.

I am attaching a patch that made the core dump go away, and attempting
to submit this patch to the upstream but I thought I would give any
OpenBSD glimpse users a head's up.  It only happens to me when I
search very large indexes.

Pax, -A

$OpenBSD$
--- agrep/sgrep.c.orig  Fri Mar 20 15:08:00 2015
+++ agrep/sgrep.c       Fri Mar 20 15:08:00 2015
@@ -381,7 +381,7 @@ int fd, in_m, D;
                                start = Max_record; 
                        }
                        /* strncpy(text+start, text+end, residue); */
-                       memcpy(text+start, text+end, residue);
+                       memmove(text+start, text+end, residue);
                        start++;
                        if (((LIMITOUTPUT > 0) && (LIMITOUTPUT <= 
num_of_matched)) ||
                            ((LIMITPERFILE > 0) && (LIMITPERFILE <= 
num_of_matched - prev_num_of_matched))) {

Reply via email to