aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/various/chprintf.c8
-rw-r--r--readme.txt2
2 files changed, 6 insertions, 4 deletions
diff --git a/os/various/chprintf.c b/os/various/chprintf.c
index 08d313dac..8c709bc4f 100644
--- a/os/various/chprintf.c
+++ b/os/various/chprintf.c
@@ -246,12 +246,12 @@ unsigned_common:
chSequentialStreamPut(chp, (uint8_t)*s++);
i--;
}
- do
+ do {
chSequentialStreamPut(chp, (uint8_t)filler);
- while (++width != 0);
+ } while (++width != 0);
}
- chSequentialStreamWrite(chp, (uint8_t*)s, i);
- s += i;
+ while (--i >= 0)
+ chSequentialStreamPut(chp, (uint8_t)*s++);
while (width) {
chSequentialStreamPut(chp, (uint8_t)filler);
diff --git a/readme.txt b/readme.txt
index e486f007f..e7afb49cb 100644
--- a/readme.txt
+++ b/readme.txt
@@ -112,6 +112,8 @@
(backported to 2.6.4).
- FIX: Fixed wrong TIM1 and TIM8 macros in STM32F30x HAL driver (bug #473)
(backported to 2.6.4).
+- FIX: Fixed chprintf()/chSequentialStreamWrite() crash with size of 0
+ or NULL (bug #472)(backported to 2.6.4).
- FIX: Fixed STM32 SDC driver clock activation issue (bug #464)(backported to
- FIX: Fixed simulated IO message is corrupted in simulator (bug #468)
(backported to 2.6.4).