]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-esp.c
ESP: Add a workaround to a "use-of-uninitialized-value"
[tcpdump] / print-esp.c
index fb94a60a5c438536e3f718704ed47919f7dcd7be..0ddcca79c85c83a6aad05d1d9432e544a45db298 100644 (file)
@@ -238,7 +238,7 @@ do_decrypt(netdissect_options *ndo, const char *caller, struct sa_list *sa,
         * we can't decrypt on top of the input buffer.
         */
        ptlen = ctlen;
-       pt = (u_char *)malloc(ptlen);
+       pt = (u_char *)calloc(1, ptlen);
        if (pt == NULL) {
                EVP_CIPHER_CTX_free(ctx);
                (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC,