mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 09:19:12 +01:00
fix: sonar sast fixes - sonar.yml, nosonar, linux chmod modification
This commit is contained in:
@@ -38,8 +38,14 @@ struct global_settings {
|
||||
bool shiftState{ false }; //m7todo: brzydko
|
||||
bool ctrlState{ false };
|
||||
bool altState{ false };
|
||||
std::mt19937 random_engine;
|
||||
std::mt19937 local_random_engine;
|
||||
// Simulation randomness, never used for anything security related: no keys, tokens or
|
||||
// credentials come out of these. Reproducibility is a requirement here, which is why both
|
||||
// are plain mt19937 -- the run's seed can be written down and passed on, and it travels in
|
||||
// server_hello so that every client in a session replays the same sequence. A generator
|
||||
// that cannot be seeded to a known state would break both of those.
|
||||
std::mt19937 random_engine; // NOSONAR shared run seed, kept in sync across the network
|
||||
std::mt19937 local_random_engine; // NOSONAR re-seeded from a true random source in init_modes,
|
||||
// drives purely local cosmetics (sound pitch, editor placement)
|
||||
bool ready_to_load{ false };
|
||||
std::time_t starting_timestamp = 0; // starting time, in local timezone
|
||||
uint32_t random_seed = 0;
|
||||
|
||||
@@ -399,7 +399,7 @@ void uart_input::poll()
|
||||
char buf[buffer.size() * 3 + 1];
|
||||
size_t pos = 0;
|
||||
for (uint8_t b : buffer)
|
||||
pos += sprintf(&buf[pos], "%02X ", b);
|
||||
pos += snprintf(&buf[pos], sizeof(buf) - pos, "%02X ", b);
|
||||
WriteLog("uart: rx: " + std::string(buf));
|
||||
}
|
||||
|
||||
@@ -635,7 +635,7 @@ void uart_input::poll()
|
||||
buf[ buffer.size() * 3 ] = 0;
|
||||
size_t pos = 0;
|
||||
for (uint8_t b : buffer)
|
||||
pos += sprintf(&buf[pos], "%02X ", b);
|
||||
pos += snprintf(&buf[pos], sizeof(buf) - pos, "%02X ", b);
|
||||
WriteLog("uart: tx: " + std::string(buf));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user