aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Common
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-08-30 19:38:41 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-08-30 19:38:41 +0300
commitdd6bc91bb43b70fcae954834cd03c6028f3eefa5 (patch)
tree08710978223e7bc2eedae6c7515a241e6b1c64a8 /Software/Embedded_SW/Embedded/Common
parent5c9bca9cb0bbbb1c448228ef5ac5f898f17e9827 (diff)
parenta4a0d4973c8eff2bbfe2c8e753f30626c9e9076d (diff)
downloadTango-dd6bc91bb43b70fcae954834cd03c6028f3eefa5.tar.gz
Tango-dd6bc91bb43b70fcae954834cd03c6028f3eefa5.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Common')
-rw-r--r--Software/Embedded_SW/Embedded/Common/protobuf-c/protobuf-c.c2
-rw-r--r--Software/Embedded_SW/Embedded/Common/report/distributor.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/protobuf-c/protobuf-c.c b/Software/Embedded_SW/Embedded/Common/protobuf-c/protobuf-c.c
index 5debac820..917022de5 100644
--- a/Software/Embedded_SW/Embedded/Common/protobuf-c/protobuf-c.c
+++ b/Software/Embedded_SW/Embedded/Common/protobuf-c/protobuf-c.c
@@ -778,6 +778,8 @@ uint32_pack(uint32_t value, uint8_t *out)
{
unsigned rv = 0;
+ assert(out > 0);
+
if (value >= 0x80) {
out[rv++] = value | 0x80;
value >>= 7;
diff --git a/Software/Embedded_SW/Embedded/Common/report/distributor.c b/Software/Embedded_SW/Embedded/Common/report/distributor.c
index e587e0575..46a3affd6 100644
--- a/Software/Embedded_SW/Embedded/Common/report/distributor.c
+++ b/Software/Embedded_SW/Embedded/Common/report/distributor.c
@@ -700,6 +700,7 @@ STATUS ReportMessage2Dist(DistributorHandle distributor, const char *message)
* None
*
*/
+char reportmsg[254];
static void messageDistribute(char *msg,
int DistTableEntry,
@@ -722,11 +723,12 @@ static void messageDistribute(char *msg,
Dist_Table[DistTableEntry].dest[index].function(msg,FileName,LineNumber,errorCode,parameter1,parameter2);
}
*/
+ strcpy (reportmsg,msg);
if (ReportFunc1 != NULL)
- ReportFunc1(msg, FileName,LineNumber,errorCode,Severity, parameter);
+ ReportFunc1(reportmsg, FileName,LineNumber,errorCode,Severity, parameter);
if (ReportFunc2 != NULL)
- ReportFunc2(msg, FileName,LineNumber,errorCode,Severity, parameter);
+ ReportFunc2(reportmsg, FileName,LineNumber,errorCode,Severity, parameter);
}