diff options
| author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-05-16 20:09:31 +0200 | 
|---|---|---|
| committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-05-16 20:09:39 +0200 | 
| commit | 977afaae343f38909d6bb6cb74b6ff846c647cb0 (patch) | |
| tree | 3c3d9f932df3e6453cab350572b36eeedf3a0a2e | |
| parent | c5c955caae1e8fa922ded4ea31165b98bfe63fbc (diff) | |
tests: gea_test: Use correct max size for key in buffer
Expect key sizes for GEA are 64-128 bits.
Change-Id: Iaf81992a2901733b630e3046b0c4bdc1fb9a8ace
| -rw-r--r-- | tests/gea/gea_test.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/tests/gea/gea_test.c b/tests/gea/gea_test.c index ebccaafd..87020e2e 100644 --- a/tests/gea/gea_test.c +++ b/tests/gea/gea_test.c @@ -23,9 +23,9 @@ static inline void print_check(char *res, uint8_t *out, uint16_t len)  static inline void test_gea(bool v4, char *kc, uint32_t iv, int dir,  			    uint16_t len, char *res)  { -    uint8_t out[len], ck[256]; +    uint8_t out[len], ck[16];      printf("len %d, dir %d, INPUT 0x%X -> ", len, dir, iv); -    osmo_hexparse(kc, ck, len); +    osmo_hexparse(kc, ck, sizeof(ck));      int t = gprs_cipher_run(out, len, v4 ? GPRS_ALGO_GEA4 : GPRS_ALGO_GEA3, ck,  			    iv, dir);      printf("%s ", t < 0 ? strerror(-t) : "OK"); | 
