Browse files

Fix CID 700722: Allocation too small for string (Coverity) in AudioOu…

…tputPulseAudio::ChooseHost()
  • Loading branch information...
1 parent 95e6182 commit 389ba609a553688417ccf2b1a8f3863ffc919bf4 @stuartm stuartm committed May 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mythtv/libs/libmyth/audio/audiooutputpulse.cpp
View
2 mythtv/libs/libmyth/audio/audiooutputpulse.cpp
@@ -482,7 +482,7 @@ char *AudioOutputPulseAudio::ChooseHost(void)
if ( !(!host || *host == 0 || strcmp(host,"default") == 0))
{
- if ((pulse_host = new char[strlen(host)]))
+ if ((pulse_host = new char[strlen(host) + 1]))
strcpy(pulse_host, host);
else
VBERROR(fn_log_tag +

0 comments on commit 389ba60

Please sign in to comment.