diff options
author | Anthony Liguori | 2013-01-11 15:43:18 +0100 |
---|---|---|
committer | Anthony Liguori | 2013-01-11 15:43:18 +0100 |
commit | fedf2de31023b4ee71a4e578db013976243a8143 (patch) | |
tree | 045c7ea2a636428ee70545ef3f76a804989be050 /readline.c | |
parent | Merge remote-tracking branch 'kraxel/q35.1' into staging (diff) | |
parent | hw/pc.c: Fix converting of ioport_register* to MemoryRegion (diff) | |
download | qemu-fedf2de31023b4ee71a4e578db013976243a8143.tar.gz qemu-fedf2de31023b4ee71a4e578db013976243a8143.tar.xz qemu-fedf2de31023b4ee71a4e578db013976243a8143.zip |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
hw/pc.c: Fix converting of ioport_register* to MemoryRegion
Replace remaining gmtime, localtime by gmtime_r, localtime_r
savevm: Remove MinGW specific code which is no longer needed
qga/channel-posix.c: Explicitly include string.h
configure: Fix comment (copy+paste bug)
readline: avoid memcpy() of overlapping regions
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'readline.c')
-rw-r--r-- | readline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/readline.c b/readline.c index 5fc9643c2b..a0c9638e4d 100644 --- a/readline.c +++ b/readline.c @@ -248,8 +248,8 @@ static void readline_hist_add(ReadLineState *rs, const char *cmdline) if (idx == READLINE_MAX_CMDS) { /* Need to get one free slot */ free(rs->history[0]); - memcpy(rs->history, &rs->history[1], - (READLINE_MAX_CMDS - 1) * sizeof(char *)); + memmove(rs->history, &rs->history[1], + (READLINE_MAX_CMDS - 1) * sizeof(char *)); rs->history[READLINE_MAX_CMDS - 1] = NULL; idx = READLINE_MAX_CMDS - 1; } |