From 8ea38ce970d7539c25d4da08065d6bfa999f3e96 Mon Sep 17 00:00:00 2001 From: "C. Davis" Date: Sun, 19 Aug 2012 19:11:16 -0700 Subject: regedit: Handle zero-length buffers better with hexedit. Reviewed-by: Andreas Schneider Reviewed-by: Michael Adam --- source3/utils/regedit_dialog.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/utils/regedit_dialog.c') diff --git a/source3/utils/regedit_dialog.c b/source3/utils/regedit_dialog.c index 08b746b5f7..d05efad142 100644 --- a/source3/utils/regedit_dialog.c +++ b/source3/utils/regedit_dialog.c @@ -1027,8 +1027,10 @@ static WERROR handle_editor_input(struct edit_dialog *edit, "Enter new size"); if (n) { newlen = strtoul(n, NULL, 10); + edit->section = IN_DATA; hexedit_resize_buffer(edit->buf, newlen); hexedit_refresh(edit->buf); + hexedit_set_cursor(edit->buf); talloc_free(n); } } else if (selection == DIALOG_CANCEL) { -- cgit