aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-06-18 17:35:46 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-06-18 17:35:46 +0200
commitdaf82414ce1343212f38c7d854af9e286e2b148e (patch)
tree411a575735a23d02288d50da6d39853373bc9c24
parent5da6fcc0481804a3c7a539c5e925abed9e6f1ab8 (diff)
downloadexternal_libsamsung-ipc-daf82414ce1343212f38c7d854af9e286e2b148e.zip
external_libsamsung-ipc-daf82414ce1343212f38c7d854af9e286e2b148e.tar.gz
external_libsamsung-ipc-daf82414ce1343212f38c7d854af9e286e2b148e.tar.bz2
sec: Actually copy the PIN lengths
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--samsung-ipc/sec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/samsung-ipc/sec.c b/samsung-ipc/sec.c
index c25dd9e..ace155b 100644
--- a/samsung-ipc/sec.c
+++ b/samsung-ipc/sec.c
@@ -40,6 +40,7 @@ int ipc_sec_pin_status_setup(struct ipc_sec_pin_status_request_data *data,
if (pin1_length > sizeof(data->pin1))
pin1_length = sizeof(data->pin1);
+ data->pin1_length = (unsigned char) pin1_length;
strncpy((char *) data->pin1, pin1, pin1_length);
}
@@ -48,6 +49,7 @@ int ipc_sec_pin_status_setup(struct ipc_sec_pin_status_request_data *data,
if (pin2_length > sizeof(data->pin2))
pin2_length = sizeof(data->pin2);
+ data->pin2_length = (unsigned char) pin2_length;
strncpy((char *) data->pin2, pin2, pin2_length);
}