From patchwork Tue May 26 16:04:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Claudi X-Patchwork-Id: 218522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 134A6C433E1 for ; Tue, 26 May 2020 16:04:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E23B820721 for ; Tue, 26 May 2020 16:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="E/jxgb/8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731286AbgEZQEc (ORCPT ); Tue, 26 May 2020 12:04:32 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54103 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728016AbgEZQEb (ORCPT ); Tue, 26 May 2020 12:04:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590509070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZRIwOSzaDOAR8K19LR7XSCEkdNxzWMLTpTWvAhUTBcE=; b=E/jxgb/80N1yffkZpha94ztR3rO4HVzBz1uxG5x8LELKeL3eTUSfGux5kaXkKCFvU/RUpk tmMuujapHgPtpkhxb1OGJTONHToWnbyeuknmZhpIhD8W/CbpbYwbOlxIhoRVaL6UhEDwY7 GKBcPs4hbQ+Hir+RyWtIat/6cZXkNvM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-32-zeyY00v2PGGmZb6tmxHMlA-1; Tue, 26 May 2020 12:04:28 -0400 X-MC-Unique: zeyY00v2PGGmZb6tmxHMlA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7251D18017E8; Tue, 26 May 2020 16:04:27 +0000 (UTC) Received: from renaissance-vector.redhat.com (unknown [10.40.192.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9972D5C1BB; Tue, 26 May 2020 16:04:17 +0000 (UTC) From: Andrea Claudi To: netdev@vger.kernel.org Cc: stephen@networkplumber.org, dsahern@gmail.com, jhs@mojatatu.com Subject: [iproute2 PATCH 0/2] Fix segfault in lib/bpf.c Date: Tue, 26 May 2020 18:04:09 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jamal reported a segfault in bpf_make_custom_path() when custom pinning is used. This is caused by commit c0325b06382cb ("bpf: replace snprintf with asprintf when dealing with long buffers"). As the only goal of that commit is to get rid of a truncation warning when compiling lib/bpf.c, revert it and fix the warning checking for snprintf return value Andrea Claudi (2): Revert "bpf: replace snprintf with asprintf when dealing with long buffers" bpf: Fixes a snprintf truncation warning lib/bpf.c | 155 +++++++++++++++--------------------------------------- 1 file changed, 41 insertions(+), 114 deletions(-)