diff options
author | C. Davis <cd.rattan@gmail.com> | 2012-08-19 19:11:16 -0700 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-04-29 13:07:54 +0200 |
commit | 8ea38ce970d7539c25d4da08065d6bfa999f3e96 (patch) | |
tree | 17d68242f17a8535bf4e3d6554e8cefd7cd882c9 /source3/utils/regedit_dialog.c | |
parent | ad15a83357dccc9a41ade1642cca24a0b7de92df (diff) | |
download | samba-8ea38ce970d7539c25d4da08065d6bfa999f3e96.tar.gz samba-8ea38ce970d7539c25d4da08065d6bfa999f3e96.tar.bz2 samba-8ea38ce970d7539c25d4da08065d6bfa999f3e96.zip |
regedit: Handle zero-length buffers better with hexedit.
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/utils/regedit_dialog.c')
-rw-r--r-- | source3/utils/regedit_dialog.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |