From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Loeliger Subject: Re: [PATCH] dtc: Fix zero-length input segfault Date: Fri, 17 Feb 2012 09:14:39 -0600 Message-ID: References: <1328605373-14063-1-git-send-email-hkronsto@frequentis.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <1328605373-14063-1-git-send-email-hkronsto-USXAA5bZaHGDvotElmWtJA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Horst Kronstorfer Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org > This patch fixes a segmentation fault caused by dereferencing a NULL > pointer (pos->file aka yylloc.file) in srcpos_string when the input > length is 0 (fe 'dtc with 0 and the tokenizer, which updates yylloc.file via srcpos_update > doesn't get a chance to run on zero-length input. > > Signed-off-by: Horst Kronstorfer Applied. Thanks, jdl