aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/audio.c2
-rw-r--r--i386-dis.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 20bb2fc264..5e2d4cfb0f 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -205,7 +205,7 @@ static char *audio_alloc_prefix (const char *s)
}
len = strlen (s);
- r = qemu_malloc (len + sizeof (qemu_prefix));
+ r = qemu_malloc (len + sizeof (qemu_prefix) + 1);
if (r) {
size_t i;
diff --git a/i386-dis.c b/i386-dis.c
index 0c97e1c7d1..5f69acaf39 100644
--- a/i386-dis.c
+++ b/i386-dis.c
@@ -2826,7 +2826,7 @@ static void
oappend (s)
const char *s;
{
- pstrcpy (obufp, (size_t)(obufp - obuf), s);
+ pstrcpy (obufp, sizeof(obuf) - (size_t)(obufp - obuf), s);
obufp += strlen (s);
}