Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37728945
en ru br
ALT Linux repositórios
S:1.1.6-alt1
5.0: 1.1.2.1-alt4
4.1: 1.1.2.1-alt3
4.0: 1.1.2.1-alt2
3.0: 1.1.2.1-alt1

Group :: Sistema/Bibliotecas
RPM: libnet2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: libnet-1.1.2.1-alt-bound.patch
Download


--- libnet/src/libnet_cq.c
+++ libnet/src/libnet_cq.c
@@ -113,8 +113,8 @@ libnet_cq_add(libnet_t *l, char *label)
         l_cq->context = l;
 
         /* label the context with the user specified string */
-        strncpy(l->label, label, LIBNET_LABEL_SIZE);
-        l->label[LIBNET_LABEL_SIZE] = '\0';
+        l->label[0] = '\0';
+        strncat(l->label, label, LIBNET_LABEL_SIZE - 1);
 
         l_cq->next = NULL;
         l_cq->prev = NULL;
@@ -144,8 +144,8 @@ libnet_cq_add(libnet_t *l, char *label)
     new->context = l;
 
     /* label the context with the user specified string */
-    strncpy(l->label, label, LIBNET_LABEL_SIZE);
-    l->label[LIBNET_LABEL_SIZE] = '\0';
+    l->label[0] = '\0';
+    strncat(l->label, label, LIBNET_LABEL_SIZE - 1);
 
     new->next = l_cq;
     new->prev = NULL;
--- libnet/src/libnet_init.c
+++ libnet/src/libnet_init.c
@@ -76,8 +76,8 @@ libnet_init(int injection_type, char *device, char *err_buf)
     l->ptag_state       = LIBNET_PTAG_INITIALIZER;
     l->device           = (device ? strdup(device) : NULL);
 
-    strncpy(l->label, LIBNET_LABEL_DEFAULT, LIBNET_LABEL_SIZE);
-    l->label[sizeof(l->label)] = '\0';
+    l->label[0] = '\0';
+    strncat(l->label, LIBNET_LABEL_DEFAULT, LIBNET_LABEL_SIZE - 1);
 
     switch (l->injection_type)
     {
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009