Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37733798
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-deb-libnet_pblock_coalesce.patch
Download


--- libnet.orig/src/libnet_pblock.c
+++ libnet/src/libnet_pblock.c
@@ -339,7 +339,7 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
                     snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, 
                     "%s(): packet assembly cannot find a layer 2 header\n",
                     __func__);
-                    return (-1);
+                    goto err;
                 }
                 break;
             case LIBNET_RAW4:
@@ -348,7 +348,7 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
                     snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, 
                     "%s(): packet assembly cannot find an IPv4 header\n",
                      __func__);
-                    return (-1);
+                    goto err;
                 }
                 break;
             case LIBNET_RAW6:
@@ -357,7 +357,7 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
                     snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, 
                     "%s(): packet assembly cannot find an IPv6 header\n",
                      __func__);
-                    return (-1);
+                    goto err;
                 }
                 break;
             default:
@@ -365,7 +365,7 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
                 snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, 
                 "%s(): suddenly the dungeon collapses -- you die\n",
                  __func__);
-                return (-1);
+                goto err;
             break;
         }
     }
@@ -419,6 +419,10 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
         *size -= l->aligner;
     }
     return (1);
+
+err:
+    free(packet);
+    return (-1);
 }
 
 void
 
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