From patchwork Fri Apr 12 23:14:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Shmidt X-Patchwork-Id: 236278 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id 1944A2C00AF for ; Sat, 13 Apr 2013 09:16:45 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2DCF39D227; Fri, 12 Apr 2013 19:16:43 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XpFsB4WjMxmp; Fri, 12 Apr 2013 19:16:42 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 035D19D214; Fri, 12 Apr 2013 19:16:39 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 019EF9D214 for ; Fri, 12 Apr 2013 19:16:38 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f16SxCLtNHuM for ; Fri, 12 Apr 2013 19:16:34 -0400 (EDT) Received: from mail-qc0-f202.google.com (mail-qc0-f202.google.com [209.85.216.202]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 31C5C9C1A9 for ; Fri, 12 Apr 2013 19:16:34 -0400 (EDT) Received: by mail-qc0-f202.google.com with SMTP id k26so299201qcs.1 for ; Fri, 12 Apr 2013 16:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:date:subject:to:message-id; bh=y0SbkARfFDavu/bqVNj4lXftfoUCC5LO1c8diNcovBs=; b=kkBY5W4nDgyzMNxvFQcS04IAVeqVCpzQU6Kk486h1urt6LSqgny32SugBYXLaOb6mR prR1nD3MGtYwODx/y6pSdIHLa0p6G60eTf3oxbTvhRL4UBTUbz13Dnua9FfYAGzvB0VC +XGxA2PRqEhZDWgS5hCuUs+8k3y4OfwtYAqn2vN+JUexZgPFbm8O3nsqglSXMlmra3s+ Qd1VXkx3CwR9lA/LNVh71jK/A+tHr1ETqzPqsNXKpClFeKaXo++srg4j3hcEP+iYg2H+ b/0rwGEppzgdGDaMwG+KkABO4ep8b6Qh5Z8s245M+ZiKwUGgB0y4Z1lt3cLxR+hX5r97 yftw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:date:subject:to:message-id:x-gm-message-state; bh=y0SbkARfFDavu/bqVNj4lXftfoUCC5LO1c8diNcovBs=; b=YAKAdo1BAeTfjkXW0hTIEIWshZfLMLkvbqmZsp0OdMYXV7sfoWHp+dd3WrbHx+C/sv WIA+oxdmw1eSBc80GgGKTHyfLI+4PQhIVuyd7Q2NCibYgp+AVnR8YU9oTLYPNpOB620h k/ni0zpg73qrY0WVwDWG+mAj/dfSR6LcJqPG2H0N4hlQ9pkUxKC11+pnd3d/0S3TqhP9 s33B6BywI/6D78eRQ89115z+LzmdTL70g5Bp8bFQjgbiSCDrMSUgvRAdN7X8LCUy/vxk zlNOVQ2G9SIAQoLQk6RFxFX2nFgapSwapD0fA+f1mHTKzbDbBzSeAuMRmEynnnj4hK9f mQNg== X-Received: by 10.236.148.211 with SMTP id v59mr6710222yhj.2.1365808593619; Fri, 12 Apr 2013 16:16:33 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id f42si547362yhl.6.2013.04.12.16.16.33 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Fri, 12 Apr 2013 16:16:33 -0700 (PDT) Received: from ushik.mtv.corp.google.com (ushik.mtv.corp.google.com [172.18.104.41]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 7980B31C121 for ; Fri, 12 Apr 2013 16:16:33 -0700 (PDT) Received: by ushik.mtv.corp.google.com (Postfix, from userid 57417) id 03A4D13FDF2; Fri, 12 Apr 2013 16:16:32 -0700 (PDT) From: Dmitry Shmidt Date: Fri, 12 Apr 2013 16:14:13 -0700 Subject: [PATCH] Check WPA state machine for NULL in scan results processing To: hostap@lists.shmoo.com Message-Id: <20130412231633.03A4D13FDF2@ushik.mtv.corp.google.com> X-Gm-Message-State: ALoCoQlJW0lHdHlduWfONXqMEVrG7mpYQXZWhME31wdvvqvFcvZMMPs7jghqcfr8M2idAyAJjh6rLk2D8ODyaaCEyHuouMxgbIUNuyPu5FPPDqTSzIjaMR1zm14SDxeFtLaNyn+VW4yNbEr0/7TrSRdfqZiJ51HYAFLaM7eH0JmBZHJm8P/ZFsNjchdG5ke+91Duk88YvMn5Pm8j9+Zs7YDPXr6+RP9w5yPTTQzcv6G+PTvSuv1Jaw4= X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com Signed-off-by: Dmitry Shmidt --- src/rsn_supp/preauth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rsn_supp/preauth.c b/src/rsn_supp/preauth.c index ab61867..f5138ed 100644 --- a/src/rsn_supp/preauth.c +++ b/src/rsn_supp/preauth.c @@ -416,7 +416,7 @@ void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid, */ int rsn_preauth_scan_results(struct wpa_sm *sm) { - if (sm->ssid_len == 0) + if (sm == NULL || sm->ssid_len == 0) return -1; /*