dect
/
dectmon
Archived
13
0
Fork 0

dectmon: fix IPEI buffer size

Need to account for the terminating '\0'.

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick Mchardy 2010-11-19 20:13:32 +01:00
parent a222b17339
commit 022a720886
2 changed files with 3 additions and 3 deletions

View File

@ -192,7 +192,7 @@ cluster_stmt : CLUSTER SHOW
portable_stmt : PORTABLE SHOW
{
char ipei[DECT_IPEI_STRING_LEN];
char ipei[DECT_IPEI_STRING_LEN + 1];
struct dect_handle_priv *priv;
struct dect_pt *pt;

View File

@ -82,7 +82,7 @@ static FILE *dect_keyfile_open(const char *mode)
static void dect_pt_write_uak(const struct dect_pt *pt)
{
char ipei[DECT_IPEI_STRING_LEN];
char ipei[DECT_IPEI_STRING_LEN + 1];
unsigned int i;
FILE *f;
@ -101,7 +101,7 @@ static void dect_pt_write_uak(const struct dect_pt *pt)
static void dect_pt_read_uak(struct dect_pt *pt)
{
char ipei[DECT_IPEI_STRING_LEN];
char ipei[DECT_IPEI_STRING_LEN + 1];
uint8_t uak[DECT_AUTH_KEY_LEN];
struct dect_ipui ipui;
unsigned int i;