Commit ac700bce63c8cc78104ff87d3864d3d656648273
1 parent
62dd234f
Fix more bugs in r5044
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5087 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
2 additions
and
2 deletions
audio/audio.c
| @@ -205,7 +205,7 @@ static char *audio_alloc_prefix (const char *s) | @@ -205,7 +205,7 @@ static char *audio_alloc_prefix (const char *s) | ||
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | len = strlen (s); | 207 | len = strlen (s); |
| 208 | - r = qemu_malloc (len + sizeof (qemu_prefix)); | 208 | + r = qemu_malloc (len + sizeof (qemu_prefix) + 1); |
| 209 | 209 | ||
| 210 | if (r) { | 210 | if (r) { |
| 211 | size_t i; | 211 | size_t i; |
i386-dis.c
| @@ -2826,7 +2826,7 @@ static void | @@ -2826,7 +2826,7 @@ static void | ||
| 2826 | oappend (s) | 2826 | oappend (s) |
| 2827 | const char *s; | 2827 | const char *s; |
| 2828 | { | 2828 | { |
| 2829 | - pstrcpy (obufp, (size_t)(obufp - obuf), s); | 2829 | + pstrcpy (obufp, sizeof(obuf) - (size_t)(obufp - obuf), s); |
| 2830 | obufp += strlen (s); | 2830 | obufp += strlen (s); |
| 2831 | } | 2831 | } |
| 2832 | 2832 |