Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2692 invoked from network); 3 Jul 2014 10:11:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jul 2014 10:11:28 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.176 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.176 mail-vc0-f176.google.com Received: from [209.85.220.176] ([209.85.220.176:64862] helo=mail-vc0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/3C-47713-F4C25B35 for ; Thu, 03 Jul 2014 06:11:27 -0400 Received: by mail-vc0-f176.google.com with SMTP id ik5so11327124vcb.35 for ; Thu, 03 Jul 2014 03:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=P1SbCKeMsWtB6P34Vxk9JdGfSI/iu5KQTq9a5HROGb0=; b=pDwgm/9Epeec45eo3SkJiz0O4lafw+kR/La4/1eqIeUjmpzURIS7suRMbrYVnI6GPM lrjnrv8RZHtOS8w3aEq6VbPbACLEzOOa3vqO8UGT1zWLYS/k4LRBSnAB7Q3vFfTYIL2a yP3eUtwy/lVXU/K1rH+QBRi5/VFxsuys4eFrbFO1IYlHNM3qxA+aF3NwTgvWWQVJHZ/c LpmpiFPzjI+fEGqRrWjYecWY+kiH2jrEOEi03wAcQ8uxIWsOV8eW/tFpRli1kbuVhlRr AhqvGtp5m83fwZEcBZefb9LHsLQLyNO9b+QaZyRJnxiFN1IUpQMwlSJXFdZuZomVuapr OtCA== MIME-Version: 1.0 X-Received: by 10.52.72.39 with SMTP id a7mr2410960vdv.13.1404382284916; Thu, 03 Jul 2014 03:11:24 -0700 (PDT) Received: by 10.58.132.70 with HTTP; Thu, 3 Jul 2014 03:11:24 -0700 (PDT) In-Reply-To: <53B51347.30405@sugarcrm.com> References: <20140703003646.GA12662@openwall.com> <53B4AC6E.5050401@sugarcrm.com> <20140703012402.GA13015@openwall.com> <20140703060837.GB16494@openwall.com> <20140703063713.GA16777@openwall.com> <53B51347.30405@sugarcrm.com> Date: Thu, 3 Jul 2014 18:11:24 +0800 Message-ID: To: Stas Malyshev Cc: Solar Designer , Ferenc Kovacs , Adam Harvey , Andrea Faulds , PHP internals , D0znpp Content-Type: multipart/alternative; boundary=20cf307f30f638b60404fd473bda Subject: Re: [PHP-DEV] multiline HTTP headers support in header() From: tjerk.meesters@gmail.com (Tjerk Meesters) --20cf307f30f638b60404fd473bda Content-Type: text/plain; charset=UTF-8 On Thu, Jul 3, 2014 at 4:24 PM, Stas Malyshev wrote: > Hi! > > > Or, check for NUL byte first and reject the whole thing if present; then > > continue with `strpbrk()` :) > > To check for nul, you need to scan the whole string. If you're already > doing this, you don't need strpbrk anymore. > Right, with that in mind we might as well keep the current loop and just break at those three "bad" characters :) > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > -- -- Tjerk --20cf307f30f638b60404fd473bda--