Skip to content

Commit

Permalink
Merge pull request #726 from microsoft/yashkhatri/1.6.10-2
Browse files Browse the repository at this point in the history
Yashkhatri/1.6.10 2
  • Loading branch information
Yash-Khatri authored Aug 9, 2022
2 parents aaec87f + 137ef71 commit b133548
Show file tree
Hide file tree
Showing 50 changed files with 1,951 additions and 1,281 deletions.
7 changes: 7 additions & 0 deletions Unix/base/buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ MI_Result Buf_Init(
if (!page)
return MI_RESULT_FAILED;

memset(page, 0, sizeof(Page) + capacity);
page->u.s.size = capacity;
page->u.s.next = 0;

Expand Down Expand Up @@ -104,6 +105,9 @@ MI_Result Buf_Reserve(
#ifdef CONFIG_ENABLE_DEBUG
if (page)
memset(((char*)(page+1)) + self->capacity,0xAA,capacity - self->capacity);
#else
if(page)
memset(((char*)(page+1)) + self->capacity,0,capacity - self->capacity);
#endif
}
else
Expand All @@ -112,6 +116,9 @@ MI_Result Buf_Reserve(
#ifdef CONFIG_ENABLE_DEBUG
if(page)
memset(page,0xAA,sizeof(Page) + capacity);
#else
if(page)
memset(page, 0, sizeof(Page) + capacity);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Unix/base/credcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void CredCache_PutUser(const char* user, const char* password)
return;

/* user name */
strcpy(s_cache[pos].user, user);
strncpy(s_cache[pos].user, user, userLen+1);//add 1 for copying terminating NULL character also

/* hash */
_Hash(user, userLen, password, strlen(password), s_cache[pos].hash);
Expand Down
Loading

0 comments on commit b133548

Please sign in to comment.