repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b155d19
)
LibCecSharp: fixed 14 char long OSD name (wasn't \0 terminated)
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Fri, 8 Mar 2013 12:45:03 +0000
(13:45 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Fri, 8 Mar 2013 12:52:01 +0000
(13:52 +0100)
src/LibCecSharp/LibCecSharp.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/LibCecSharp/LibCecSharp.cpp
b/src/LibCecSharp/LibCecSharp.cpp
index 889bd4758d1fbe2c647ea216fb9d057caba00361..0bae3eaca39e9d820f49b605968b6e39d78fa580 100644
(file)
--- a/
src/LibCecSharp/LibCecSharp.cpp
+++ b/
src/LibCecSharp/LibCecSharp.cpp
@@
-474,7
+474,11
@@
namespace CecSharp
String ^ GetDeviceOSDName(CecLogicalAddress logicalAddress)
{
cec_osd_name osd = m_libCec->GetDeviceOSDName((cec_logical_address) logicalAddress);
- return gcnew String(osd.name);
+ // we need to terminate with \0, and we only got 14 chars in osd.name
+ char strOsdName[15];
+ memset(strOsdName, 0, sizeof(strOsdName));
+ memcpy(strOsdName, osd.name, sizeof(osd.name));
+ return gcnew String(strOsdName);
}
/// <summary>