Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70438 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47343 invoked from network); 27 Nov 2013 10:24:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2013 10:24:14 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.50 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.128.50 mail-qe0-f50.google.com Received: from [209.85.128.50] ([209.85.128.50:37420] helo=mail-qe0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/83-24795-D48C5925 for ; Wed, 27 Nov 2013 05:24:14 -0500 Received: by mail-qe0-f50.google.com with SMTP id 1so5028491qec.37 for ; Wed, 27 Nov 2013 02:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=5+QkdIbZEeXSkgSXHxADP/+sVR/+sP191d1XUc3rhPM=; b=C5ivs2+SPoBVd0foEzmr4pQzeyHSwiD06X8Jd3ObhBPvvzkIH0K9dHdntUb4pn2AHz EJc+jbyMqgDnbC4vlDvlbsCZOf9+Qjh/SVQMbdi37a95nIq2ll1ad7VZrWaDL4LPSOnJ fcd16Jmjt4Qj/F8hJshE725va0TUyfnXpvtS8RF7tD3ua1sGTMHJPC29m30Rg5TqDFge zDTKxmiGhTWOJgvqUY/xkOh1pNihR4XMnvmNbx/Sj2z+jesMaqorNZZ0CejBSk3CQ7a5 a/M39rG3nJKipXHxxfDArl3I/AQmzGqRzkIJ03SlPKe2USTDYajKo8MZo0aGslsPEDA0 qQag== MIME-Version: 1.0 X-Received: by 10.224.66.134 with SMTP id n6mr37709164qai.39.1385547851415; Wed, 27 Nov 2013 02:24:11 -0800 (PST) Sender: jakub.php@gmail.com Received: by 10.224.37.133 with HTTP; Wed, 27 Nov 2013 02:24:11 -0800 (PST) In-Reply-To: References: Date: Wed, 27 Nov 2013 10:24:11 +0000 X-Google-Sender-Auth: w5InMPuhM0DU8SFwxOYJ7UG4sqc Message-ID: To: Anatol Belski Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c2bd8480ce6104ec25ffe0 Subject: Re: [PHP-DEV] size_t and 64 bit integer branch From: bukka@php.net (Jakub Zelenka) --001a11c2bd8480ce6104ec25ffe0 Content-Type: text/plain; charset=ISO-8859-1 Hi Anatol On Wed, Nov 27, 2013 at 8:37 AM, Anatol Belski wrote: > > your patch looks fine. Unfortunately I've overseen your mail in the daily > flood and made some changes to openssl too. Why didn't you update the wiki > page by going on? It's exactly for the purpose of knowing what's currently > going on :) In any case, could you please merge with the current state and > do a PR? I'll merge it then. > > One thing though about openssl and issues you mention in the gist - the > 'int' vs. php_int_t overflows on 64 bit should be fixed on run time > checking against INT_MAX. Maybe that's what you could extend for the > openssl ext. That's an issue in many other libs too. > > Thanks for you work > > Anatol > > I quickly looked on your commit and think that we mostly did the same stuff :). Sorry for not updating the wiki, thought that will be better if I email you first. However there few extra fixes in my commit and some extra fixes in your commits so I will merge them. php_int_t vs int fixes will be quite easy. I'll do that. The bigger task is int vs size_t (zend_str_size...) - signed vs unsigned. For some cases (encryption, digest and other ctx updates) this can be fixed by splitting the processing into more ctx updates. I think this could be useful on 32bit when someone tries to encrypt more than 1 << 32 string. In that case, using one update (as it is now) would fail. Other cases should probably generate an error as there are not useful anyway. There few other case that I need to look at as well (bio_buf_st->length, ASN_STRING length retval...). I can assign it to myself in the wiki and set status "in progress" and when it's done, I will update it and send PR. Is that ok? Jakub --001a11c2bd8480ce6104ec25ffe0--