Includes patch sent to developer to show position in bigger files,
and changing strcat with strlcat and sprintf with snprintf.
--
Dios, gracias por tu amor infinito.
--
Vladimir Támara Patiño. http://vtamara.pasosdeJesus.org/
http://www.pasosdejesus.org/dominio_publico_colombia.html
diff -ruN -x CVS -x *~ /usr/ports/editors/hexedit/patches/patch-display_c
./patches/patch-display_c
--- /usr/ports/editors/hexedit/patches/patch-display_c Wed Dec 31 19:00:00 1969
+++ ./patches/patch-display_c Mon May 27 12:06:01 2013
@@ -0,0 +1,30 @@
+$OpenBSD$
+--- display.c.orig Tue Nov 8 11:16:47 2005
++++ display.c Thu Mar 21 10:49:07 2013
+@@ -162,7 +162,7 @@ void display(void)
+ move(i / lineLength, 0);
+ for (j = 0; j < colsUsed; j++) printw(" "); /* cleanup the line */
+ move(i / lineLength, 0);
+- PRINTW(("%08lX", (int) (base + i)));
++ PRINTW(("%09lX", (unsigned long int) (base + i)));
+ }
+
+ attrset(NORMAL);
+@@ -183,7 +183,7 @@ void displayLine(int offset, int max)
+ {
+ int i;
+
+- PRINTW(("%08lX ", (int) (base + offset)));
++ PRINTW(("%09lX ", (unsigned long) (base + offset)));
+ for (i = offset; i < offset + lineLength; i++) {
+ if (i > offset) MAXATTRPRINTW(bufferAttr[i] & MARKED, (((i - offset) %
blocSize) ? " " : " "));
+ if (i < max) {
+@@ -248,7 +248,7 @@ int displayMessageAndGetString(char *msg, char **last,
+ getnstr(p, p_size - 1);
+ noecho();
+ if (*p == '\0') {
+- if (*last) strcpy(p, *last); else ret = FALSE;
++ if (*last) strlcpy(p, *last, p_size); else ret = FALSE;
+ } else {
+ FREE(*last);
+ *last = strdup(p);
diff -ruN -x CVS -x *~ /usr/ports/editors/hexedit/patches/patch-hexedit_h
./patches/patch-hexedit_h
--- /usr/ports/editors/hexedit/patches/patch-hexedit_h Mon Sep 17 07:50:09 2012
+++ ./patches/patch-hexedit_h Mon May 27 12:06:01 2013
@@ -1,6 +1,6 @@
-$OpenBSD: patch-hexedit_h,v 1.2 2012/09/17 12:50:09 gonzalo Exp $
---- hexedit.h.orig Tue Nov 8 13:16:47 2005
-+++ hexedit.h Mon Sep 3 13:56:59 2012
+$OpenBSD$
+--- hexedit.h.orig Thu Mar 14 13:27:03 2013
++++ hexedit.h Thu Mar 14 13:27:32 2013
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
diff -ruN -x CVS -x *~ /usr/ports/editors/hexedit/patches/patch-search_c
./patches/patch-search_c
--- /usr/ports/editors/hexedit/patches/patch-search_c Wed Dec 31 19:00:00 1969
+++ ./patches/patch-search_c Mon May 27 12:06:01 2013
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- search.c.orig Tue Nov 8 11:16:47 2005
++++ search.c Thu Mar 14 13:32:36 2013
+@@ -68,7 +68,7 @@ void search_forward(void)
+ else if (getch() != ERR) quit = -2;
+ else if ((p = mymemmem(tmp, sizeb, string, sizea))) quit = p - tmp;
+
+- sprintf(tmpstr,"searching... 0x%08llX", (long long) blockstart);
++ snprintf(tmpstr, BLOCK_SEARCH_SIZE, "searching... 0x%08llX", (long long)
blockstart);
+ nodelay(stdscr, TRUE);
+ displayTwoLineMessage(tmpstr, "(press any key to cancel)");
+
+@@ -99,7 +99,7 @@ void search_backward(void)
+ else if ((p = mymemrmem(tmp, sizeb, string, sizea))) quit = p - tmp;
+ }
+
+- sprintf(tmpstr,"searching... 0x%08llX", (long long) blockstart);
++ snprintf(tmpstr, BLOCK_SEARCH_SIZE, "searching... 0x%08llX", (long long)
blockstart);
+ nodelay(stdscr, TRUE);
+ displayTwoLineMessage(tmpstr, "(press any key to cancel)");
+