diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-04-22 11:21:53 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-04-22 11:21:53 +0000 |
commit | d57fe5ccdf096b2cfe3973afc78f51ec48f62b77 (patch) | |
tree | fe55aaa28de7fa9a882d46f12c01bad54479b98c | |
parent | 6f08d653f6359af9583415fe8ac175dfe5170123 (diff) | |
download | ChibiOS-d57fe5ccdf096b2cfe3973afc78f51ec48f62b77.tar.gz ChibiOS-d57fe5ccdf096b2cfe3973afc78f51ec48f62b77.tar.bz2 ChibiOS-d57fe5ccdf096b2cfe3973afc78f51ec48f62b77.zip |
Fixed bug #472.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6877 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/various/chprintf.c | 8 | ||||
-rw-r--r-- | readme.txt | 2 |
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).
|