summaryrefslogtreecommitdiffstats
path: root/utils/imxtools/sbtools
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-08-22 00:49:34 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-08-22 00:49:34 +0200
commite64008bf9ab62074beabb1d061ab228b7bf5d0b5 (patch)
tree4569e931bdd86c2ede34973bdd281a20817065c6 /utils/imxtools/sbtools
parent05bd3e4cd23da3b7dc67374c940e43d285b2e03e (diff)
downloadrockbox-e64008bf9ab62074beabb1d061ab228b7bf5d0b5.tar.gz
rockbox-e64008bf9ab62074beabb1d061ab228b7bf5d0b5.tar.bz2
rockbox-e64008bf9ab62074beabb1d061ab228b7bf5d0b5.zip
sbtools: fix buffer overflow
Change-Id: I7b1c963e58eec88da215722ec219569a0a5a9cea
Diffstat (limited to 'utils/imxtools/sbtools')
-rw-r--r--utils/imxtools/sbtools/sb1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/imxtools/sbtools/sb1.c b/utils/imxtools/sbtools/sb1.c
index ed5893f454..06e29c4ecb 100644
--- a/utils/imxtools/sbtools/sb1.c
+++ b/utils/imxtools/sbtools/sb1.c
@@ -159,7 +159,7 @@ enum sb1_error_t sb1_write_file(struct sb1_file_t *sb, const char *filename)
memmove(buf + i * SECTOR_SIZE, buf + i * (SECTOR_SIZE - 4), SECTOR_SIZE - 4);
union xorcrypt_key_t key[2];
- memcpy(key, sb->key.u.xor_key, sizeof(sb->key));
+ memcpy(key, sb->key.u.xor_key, sizeof(sb->key.u.xor_key));
void *ptr = header + 1;
int offset = header->header_size;
for(unsigned i = 0; i < image_size / SECTOR_SIZE; i++)