From patchwork Sun Apr 21 21:48:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 16283 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f198.google.com (mail-gg0-f198.google.com [209.85.161.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 77A5520F45 for ; Sun, 21 Apr 2013 21:49:11 +0000 (UTC) Received: by mail-gg0-f198.google.com with SMTP id a5sf9072946ggn.5 for ; Sun, 21 Apr 2013 14:48:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=WK+n+zKyRpo6IoeqpUBaQ2m5cavT4f0qHbiiD0hB8jQ=; b=PhCLDVEjxR3H0LnKo4ZGGp9WFhGj2MZH/1k0DYc6ZpZZuQzdgJZ7uK7KnAvVr9v4bd jVCAjhw60wxUkvrrBMGwGlgmUXOmvuKiW1e/5DNu+HSV+4wuOVrykG3a8BKVmDESgGg0 JTNIPgFuLIe7eoNzORoINAsUSVrgdb5SJTPbByPipINx5EZZIXyP17tk8CFmCtJ1RDxv RAcp9OtiJmqdlI9NMnL7gC/o1eDki8G7rBGJsXv8lhm7JhdWl3GjF8kQ9vSVGs6X0le7 zIkNNeBlMdW78xJWd6VtGt5ColHvwEFOfjkJf8UCmJqKq+OX/AUfyXmKPpuQK9evSgmH f2+g== X-Received: by 10.224.58.77 with SMTP id f13mr18015805qah.7.1366580906354; Sun, 21 Apr 2013 14:48:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.112 with SMTP id k16ls2893763qen.59.gmail; Sun, 21 Apr 2013 14:48:26 -0700 (PDT) X-Received: by 10.58.232.98 with SMTP id tn2mr17013384vec.57.1366580906229; Sun, 21 Apr 2013 14:48:26 -0700 (PDT) Received: from mail-vb0-x22a.google.com (mail-vb0-x22a.google.com [2607:f8b0:400c:c02::22a]) by mx.google.com with ESMTPS id d10si14657253vdv.106.2013.04.21.14.48.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Apr 2013 14:48:26 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22a; Received: by mail-vb0-f42.google.com with SMTP id p12so5295946vbe.15 for ; Sun, 21 Apr 2013 14:48:26 -0700 (PDT) X-Received: by 10.220.242.73 with SMTP id lh9mr17148140vcb.49.1366580906048; Sun, 21 Apr 2013 14:48:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp52315veb; Sun, 21 Apr 2013 14:48:25 -0700 (PDT) X-Received: by 10.50.49.7 with SMTP id q7mr1875013ign.6.1366580905154; Sun, 21 Apr 2013 14:48:25 -0700 (PDT) Received: from mail-ia0-x22f.google.com (mail-ia0-x22f.google.com [2607:f8b0:4001:c02::22f]) by mx.google.com with ESMTPS id hn4si12541623igb.30.2013.04.21.14.48.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Apr 2013 14:48:24 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c02::22f is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=2607:f8b0:4001:c02::22f; Received: by mail-ia0-f175.google.com with SMTP id i38so659564iae.6 for ; Sun, 21 Apr 2013 14:48:24 -0700 (PDT) X-Received: by 10.50.70.70 with SMTP id k6mr6449316igu.81.1366580904571; Sun, 21 Apr 2013 14:48:24 -0700 (PDT) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id xd4sm14351648igb.3.2013.04.21.14.48.22 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Apr 2013 14:48:23 -0700 (PDT) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 1/1] piglit-framework-cl.c: When extensions is NULL, don't segv Date: Sun, 21 Apr 2013 21:48:09 +0000 Message-Id: <1366580889-23552-1-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQlOj9BsRrsYIN6Kf5qEDFBqCnuLyeuoh5z0n2V452TW1o2NZWaEkabz0nbw19qsEBcHrfM2 X-Original-Sender: tom.gall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In check_platform_extensions, fix a bug where if extentions was NULL, it'll segv. Signed-off-by: Tom Gall --- tests/util/piglit-framework-cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/util/piglit-framework-cl.c b/tests/util/piglit-framework-cl.c index deddc8d..4435bf7 100644 --- a/tests/util/piglit-framework-cl.c +++ b/tests/util/piglit-framework-cl.c @@ -84,9 +84,10 @@ print_test_info(const struct piglit_cl_test_config_header* config, bool check_platform_extensions(cl_platform_id platform_id, char* extensions) { - char* pch; + char* pch=NULL; - pch = strtok(extensions, " "); + if (extensions) + pch = strtok(extensions, " "); while(pch != NULL) { if( strlen(pch) > 0 && !piglit_cl_is_platform_extension_supported(platform_id, pch)) {