summaryrefslogtreecommitdiff
path: root/libnet/src/libnet_cq.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnet/src/libnet_cq.c')
-rw-r--r--libnet/src/libnet_cq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnet/src/libnet_cq.c b/libnet/src/libnet_cq.c
index d64a22f..ad0b6ae 100644
--- a/libnet/src/libnet_cq.c
+++ b/libnet/src/libnet_cq.c
@@ -116,7 +116,7 @@ libnet_cq_add(libnet_t *l, char *label)
/* label the context with the user specified string */
strncpy(l->label, label, LIBNET_LABEL_SIZE);
- l->label[LIBNET_LABEL_SIZE] = '\0';
+ l->label[LIBNET_LABEL_SIZE - 1] = '\0';
l_cq->next = NULL;
l_cq->prev = NULL;
@@ -147,7 +147,7 @@ libnet_cq_add(libnet_t *l, char *label)
/* label the context with the user specified string */
strncpy(l->label, label, LIBNET_LABEL_SIZE);
- l->label[LIBNET_LABEL_SIZE] = '\0';
+ l->label[LIBNET_LABEL_SIZE -1] = '\0';
new->next = l_cq;
new->prev = NULL;