You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/15 14:36:16 UTC

[GitHub] [incubator-nuttx] anchao commented on a change in pull request #5007: arch/assert: flush the syslog before stack dump to avoid buffer overwrite

anchao commented on a change in pull request #5007:
URL: https://github.com/apache/incubator-nuttx/pull/5007#discussion_r769684413



##########
File path: arch/z16/src/common/z16_stackdump.c
##########
@@ -68,8 +69,12 @@ static void z16_stackdump(void)
       stack = stack_base;
     }
 
+  /* Flush any buffered SYSLOG data to avoid overwrite */
+
+  syslog_flush();
+
   for (stack = stack & ~0x0f;
-       stack < stack_base + stack_size;
+       stack < ((stack_base + stack_size) & ~0x1f);

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org