Commit 2d6f89714186bc51d20d34641bf4ab5a726ab54a
1 parent
cb5a7aa8
Fix more r5087 breakage
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5337 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
4 deletions
audio/audio.c
| @@ -212,7 +212,7 @@ static char *audio_alloc_prefix (const char *s) | @@ -212,7 +212,7 @@ static char *audio_alloc_prefix (const char *s) | ||
| 212 | char *u = r + sizeof (qemu_prefix) - 1; | 212 | char *u = r + sizeof (qemu_prefix) - 1; |
| 213 | 213 | ||
| 214 | pstrcpy (r, len + sizeof (qemu_prefix), qemu_prefix); | 214 | pstrcpy (r, len + sizeof (qemu_prefix), qemu_prefix); |
| 215 | - pstrcat (r, len, s); | 215 | + pstrcat (r, len + sizeof (qemu_prefix), s); |
| 216 | 216 | ||
| 217 | for (i = 0; i < len; ++i) { | 217 | for (i = 0; i < len; ++i) { |
| 218 | u[i] = toupper (u[i]); | 218 | u[i] = toupper (u[i]); |
| @@ -467,16 +467,13 @@ static void audio_process_options (const char *prefix, | @@ -467,16 +467,13 @@ static void audio_process_options (const char *prefix, | ||
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | pstrcpy (optname, optlen, qemu_prefix); | 469 | pstrcpy (optname, optlen, qemu_prefix); |
| 470 | - optlen -= preflen; | ||
| 471 | 470 | ||
| 472 | /* copy while upper-casing, including trailing zero */ | 471 | /* copy while upper-casing, including trailing zero */ |
| 473 | for (i = 0; i <= preflen; ++i) { | 472 | for (i = 0; i <= preflen; ++i) { |
| 474 | optname[i + sizeof (qemu_prefix) - 1] = toupper (prefix[i]); | 473 | optname[i + sizeof (qemu_prefix) - 1] = toupper (prefix[i]); |
| 475 | } | 474 | } |
| 476 | pstrcat (optname, optlen, "_"); | 475 | pstrcat (optname, optlen, "_"); |
| 477 | - optlen--; | ||
| 478 | pstrcat (optname, optlen, opt->name); | 476 | pstrcat (optname, optlen, opt->name); |
| 479 | - optlen -= len; | ||
| 480 | 477 | ||
| 481 | def = 1; | 478 | def = 1; |
| 482 | switch (opt->tag) { | 479 | switch (opt->tag) { |