mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-10-26 14:00:08 +00:00
Fix null termination issue if /proc/cpuinfo was over 4KB
This commit is contained in:
1 parent
4b41692fd8
commit
3611f1dd89
1 file changed
+1
-1
+1
-1
@@ -333,7 +333,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
|
|||||||
|
|
||||||
#ifdef __arm__
|
#ifdef __arm__
|
||||||
char cpuinfo[4096] = {};
|
char cpuinfo[4096] = {};
|
||||||
if (read_file("/proc/cpuinfo", cpuinfo, sizeof(cpuinfo)) > 0) {
|
if (read_file("/proc/cpuinfo", cpuinfo, sizeof(cpuinfo) - 1) > 0) {
|
||||||
// If this is a ARMv6 CPU (like the Pi 1), we'll assume it's not
|
// If this is a ARMv6 CPU (like the Pi 1), we'll assume it's not
|
||||||
// powerful enough to handle audio encryption. The Pi 1 could
|
// powerful enough to handle audio encryption. The Pi 1 could
|
||||||
// barely handle Opus decoding alone.
|
// barely handle Opus decoding alone.
|
||||||
|
|||||||
Reference in new issue
Block a user