diff options
author | popcornmix <popcornmix@gmail.com> | 2013-06-18 03:36:04 -0700 |
---|---|---|
committer | popcornmix <popcornmix@gmail.com> | 2013-06-18 03:36:04 -0700 |
commit | 6aa6247a0204963b536f9008dcc84c991198639b (patch) | |
tree | 9e2bfb8122e0b05f464fd5bc94d9ea0f52f6b709 | |
parent | 0faa3d293a6cffa4f76ece1a236155521e07b392 (diff) | |
parent | 7abe83620ce75bf4d7e12e0bc6f6f7425fb04ae7 (diff) |
Merge pull request #2888 from popcornmix/version_overflow
[rbp] Avoid overflow in version string
-rw-r--r-- | xbmc/linux/RBP.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xbmc/linux/RBP.cpp b/xbmc/linux/RBP.cpp index 8daf161202..a9568e2e50 100644 --- a/xbmc/linux/RBP.cpp +++ b/xbmc/linux/RBP.cpp @@ -55,9 +55,10 @@ bool CRBP::Initialize() void CRBP::LogFirmwareVerison() { - char response[80]; + char response[160]; m_DllBcmHost->vc_gencmd(response, sizeof response, "version"); - CLog::Log(LOGNOTICE, "Raspberry PI firmware version: %s\n", response); + response[sizeof(response) - 1] = '\0'; + CLog::Log(LOGNOTICE, "Raspberry PI firmware version: %s", response); } void CRBP::Deinitialize() |