We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 065f958 commit 2adfbcaCopy full SHA for 2adfbca
components/libc/compilers/common/time.c
@@ -239,6 +239,9 @@ RTM_EXPORT(mktime);
239
240
char* asctime_r(const struct tm *t, char *buf)
241
{
242
+ RT_ASSERT(rt_strlen(days) > (t->tm_wday << 2));
243
+ RT_ASSERT(rt_strlen(months) > (t->tm_mon << 2));
244
+
245
/* "Wed Jun 30 21:49:08 1993\n" */
246
*(int*) buf = *(int*) (days + (t->tm_wday << 2));
247
*(int*) (buf + 4) = *(int*) (months + (t->tm_mon << 2));
0 commit comments