sonyupdneo: Fix array overrun

This commit is contained in:
Solomon Peachy 2019-11-07 12:34:21 -05:00
parent aa8a8ffbf2
commit 8d319efac3
1 changed files with 2 additions and 2 deletions

View File

@ -387,7 +387,7 @@ static int updneo_get_status(struct updneo_ctx *ctx)
int j;
char buf[7];
buf[6] = 0;
for (j = 0 ; j < 5 ; j++) {
for (j = 0 ; j < 2 ; j++) {
memcpy(buf, dict[i].val + (6*j), 6);
ctx->sts.scsvi[j] = strtol(buf, NULL, 16);
}
@ -395,7 +395,7 @@ static int updneo_get_status(struct updneo_ctx *ctx)
int j;
char buf[7];
buf[6] = 0;
for (j = 0 ; j < 5 ; j++) {
for (j = 0 ; j < 2 ; j++) {
memcpy(buf, dict[i].val + (6*j), 6);
ctx->sts.scmni[j] = strtol(buf, NULL, 16);
}