Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Revision 47:e32b5dd8af6d, committed 2016-01-11
- Comitter:
- mbed_official
- Date:
- Mon Jan 11 17:00:10 2016 +0000
- Parent:
- 46:cb4f85f96d35
- Child:
- 48:b854a29e778d
- Commit message:
- Synchronized with git revision 42ceddf229b846d16879773feded31713dc9d5e9
Full URL: https://github.com/mbedmicro/mbed/commit/42ceddf229b846d16879773feded31713dc9d5e9/
Fix m7core
Changed in this revision
| common/RawSerial.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/common/RawSerial.cpp Mon Jan 11 09:45:10 2016 +0000
+++ b/common/RawSerial.cpp Mon Jan 11 17:00:10 2016 +0000
@@ -47,7 +47,10 @@
int RawSerial::printf(const char *format, ...) {
std::va_list arg;
va_start(arg, format);
- int len = vsnprintf(NULL, 0, format, arg);
+ // ARMCC microlib does not properly handle a size of 0.
+ // As a workaround supply a dummy buffer with a size of 1.
+ char dummy_buf[1];
+ int len = vsnprintf(dummy_buf, sizeof(dummy_buf), format, arg);
if (len < STRING_STACK_LIMIT) {
char temp[STRING_STACK_LIMIT];
vsprintf(temp, format, arg);
