sbtools: fix a few memcpy with overlapping src/dst, fix a parsing bug (would access one byte paste the end of the buffer)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29868 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a29ef617f3
commit
bdb8f4c15c
3 changed files with 3 additions and 3 deletions
|
@ -155,7 +155,7 @@ void EncryptAES(byte *msg, byte *key, byte *c) {
|
|||
expand_key(key,keys);
|
||||
|
||||
// First Round
|
||||
memcpy(c, msg, 16);
|
||||
memmove(c, msg, 16);
|
||||
xor_round_key(c,keys,0);
|
||||
|
||||
// Middle rounds
|
||||
|
|
|
@ -307,7 +307,7 @@ static void parse_identifier(char **ptr, char *end, struct lexem_t *lexem)
|
|||
static void next_lexem(char **ptr, char *end, struct lexem_t *lexem)
|
||||
{
|
||||
#define ret_simple(t, advance) ({(*ptr) += advance; lexem->type = t; return;})
|
||||
while(true)
|
||||
while(*ptr != end)
|
||||
{
|
||||
/* skip whitespace */
|
||||
if(**ptr == ' ' || **ptr == '\t' || **ptr == '\n' || **ptr == '\r')
|
||||
|
|
|
@ -103,7 +103,7 @@ void sha_1_block(struct sha_1_params_t *params, uint32_t cur_hash[5], byte *data
|
|||
|
||||
#define w params->w
|
||||
|
||||
memcpy(w, data, 64);
|
||||
memmove(w, data, 64);
|
||||
for(int i = 0; i < 16; i++)
|
||||
byte_swap32(&w[i]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue