summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-11-07 12:34:21 -0500
committerSolomon Peachy <pizza@shaftnet.org>2019-11-07 12:34:21 -0500
commit203fffdfce52231144b48392f61f61b0d4781714 (patch)
treef99c8a9b0e33ad7065224261750384af57d85d64
parent047e8973e4da5160890fdadf12dc8318bb04729e (diff)
downloadselphy_print-203fffdfce52231144b48392f61f61b0d4781714.tar.gz
selphy_print-203fffdfce52231144b48392f61f61b0d4781714.tar.bz2
selphy_print-203fffdfce52231144b48392f61f61b0d4781714.zip
sonyupdneo: Fix array overrun
-rw-r--r--backend_sonyupdneo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend_sonyupdneo.c b/backend_sonyupdneo.c
index 10ade66..1e7ad9a 100644
--- a/backend_sonyupdneo.c
+++ b/backend_sonyupdneo.c
@@ -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);
}