Исправлена ошибка переполнения буфера
This commit is contained in:
parent
1a14f2bc11
commit
859b2a5e17
|
|
@ -20,7 +20,7 @@ typedef struct {
|
|||
struct {
|
||||
tXfcProtProcessor table[16];
|
||||
uint8_t rxArr[256];
|
||||
uint8_t txArr[2048];
|
||||
uint8_t txArr[1024 * 3];
|
||||
tSerialBridge serialBridge[8];
|
||||
tVersionPair versions[3];
|
||||
} memAlloc;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include "ComIntCmd/VersionsInfo.h"
|
||||
#include "ComIntCmd/AccelCalibration.h"
|
||||
|
||||
|
||||
|
||||
static void ComInt_LoadMetadata(tComInt *env) {
|
||||
env->versions.firmware = StringStaticInit("1.1.0");
|
||||
|
||||
|
|
@ -53,18 +55,21 @@ static void ComIntInitVersions(tComInt *env, tString16 *deviceId) {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
static void ComIntInitSerialBridges(
|
||||
tComInt *env,
|
||||
tSerialPortIO *gsmIo,
|
||||
tSerialPortIO *gnssIo,
|
||||
tSerialPortIO *cliIo
|
||||
) {
|
||||
|
||||
SerialBridges_InitStatic(&env->serialBridges, env->memAlloc.serialBridge);
|
||||
if (gnssIo)SerialBridges_AddStatic(&env->serialBridges, "GNSS", gnssIo);
|
||||
if (gsmIo)SerialBridges_AddStatic(&env->serialBridges, "AT_GSM", gsmIo);
|
||||
if (cliIo)SerialBridges_AddStatic(&env->serialBridges, "CLI", cliIo);
|
||||
}
|
||||
|
||||
|
||||
void ComInt_Init(
|
||||
tComInt *env,
|
||||
tSerialPortIO *io,
|
||||
|
|
@ -100,7 +105,6 @@ void ComInt_Init(
|
|||
env->thread.id = 0;
|
||||
}
|
||||
|
||||
|
||||
static _Noreturn void ComInt_Thread(tComInt *env) {
|
||||
|
||||
for (;;) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue