summaryrefslogtreecommitdiffstats
path: root/libelf/gelf_xlate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libelf/gelf_xlate.c')
-rw-r--r--libelf/gelf_xlate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libelf/gelf_xlate.c b/libelf/gelf_xlate.c
index c417051a..c5805e73 100644
--- a/libelf/gelf_xlate.c
+++ b/libelf/gelf_xlate.c
@@ -1,5 +1,5 @@
/* Transformation functions for ELF data types.
- Copyright (C) 1998,1999,2000,2002,2004,2005,2006,2007 Red Hat, Inc.
+ Copyright (C) 1998,1999,2000,2002,2004,2005,2006,2007,2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
@@ -52,7 +52,8 @@ static void
(elf_cvt_Byte) (void *dest, const void *src, size_t n,
int encode __attribute__ ((unused)))
{
- memmove (dest, src, n);
+ if (n != 0)
+ memmove (dest, src, n);
}