Return-Path: X-Original-To: apmail-openoffice-dev-archive@www.apache.org Delivered-To: apmail-openoffice-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BD11918F6C for ; Tue, 1 Mar 2016 04:12:10 +0000 (UTC) Received: (qmail 32637 invoked by uid 500); 1 Mar 2016 04:12:10 -0000 Delivered-To: apmail-openoffice-dev-archive@openoffice.apache.org Received: (qmail 32558 invoked by uid 500); 1 Mar 2016 04:12:10 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 32547 invoked by uid 99); 1 Mar 2016 04:12:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Mar 2016 04:12:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C1273C0270 for ; Tue, 1 Mar 2016 04:12:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.971 X-Spam-Level: X-Spam-Status: No, score=0.971 tagged_above=-999 required=6.31 tests=[SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id uttNuABuDe9z for ; Tue, 1 Mar 2016 04:12:08 +0000 (UTC) Received: from biz190.inmotionhosting.com (biz190.inmotionhosting.com [192.145.239.36]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 8A6EA5FAED for ; Tue, 1 Mar 2016 04:12:08 +0000 (UTC) Received: from ip70-181-175-67.sd.sd.cox.net ([70.181.175.67]:58695 helo=[192.168.1.113]) by biz190.inmotionhosting.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.86) (envelope-from ) id 1aabfC-001eM1-Uo for dev@openoffice.apache.org; Mon, 29 Feb 2016 20:12:00 -0800 Subject: Re: Profile.c bugs (was RE: Some thoughts on the learning curve) To: dev@openoffice.apache.org References: <56D50F6F.4000301@apache.org> From: Patricia Shanahan Message-ID: <56D5168B.4060909@acm.org> Date: Mon, 29 Feb 2016 20:11:55 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56D50F6F.4000301@apache.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - biz190.inmotionhosting.com X-AntiAbuse: Original Domain - openoffice.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - acm.org X-Get-Message-Sender-Via: biz190.inmotionhosting.com: authenticated_id: pats+patriciashanahan.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: biz190.inmotionhosting.com: pats@patriciashanahan.com On 2/29/2016 7:41 PM, Pedro Giffuni wrote: > Hello; > > FWIW, I have looked at i126669 and Coverity confirms there is a bug there. > > CID 440168 (#1 of 1): Dereference after null check (FORWARD_NULL)9. > var_deref_model: Passing null pointer "&pProfile->m_AccessLock" to > function "pthread_mutex_unlock(pthread_mutex_t *)", which dereferences it. > > I suggest taking pthread_mutex_unlock outside the "if". > > I am attaching a patch: CC'd to orcmid jic the list rejects it. > > Of course it needs testing and you have to check the windows code too. The current code does not unlock m_AccessLock in the non-null case until line 366, after doing more work on the profile. I am reasonably sure we should leave that alone. The question is what, if anything, should be done about m_AccessLock in the pProfile null case. Patricia --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org For additional commands, e-mail: dev-help@openoffice.apache.org