From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 22B1144AE1 for ; Fri, 12 Sep 2025 13:24:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1757683436; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=Os+fmOwXOvAkCriBlI+0ZJa9i+40gTOO1kdz5xx0KWA=; b=OO3q1A80CSKAZp8pInBcB09/9osQAiDLtwr5DE96Hs48DrYUH2ECpps3fR6NgTxWj0o9r hgUeB1hEcnNPGFUopS1z0OWrbHf0MNd/4vKsb8FnX7C3RJLn1WSQIR45NPDTErG4JIvp/bz HNrJn95TQdWjDJAYaxWoGS96YiPK8j2tMQ1BbLl/NdIqF8dAfwR2WN1ppWWpmNzL9GXskvK rXLp2OfLydfnwWPu1Qa4Tazk6ybSbzGQvl9xjQqEJWCd/8Xk6o+RH4LwwPJLDfr0aTquz3R J7vPEfaAMwcqXjtWwf+5Ozfyv0d8WK2+nvO+YkfyDiFlQecU/Kc89hcSxTFw== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id B7ABF68E827; Fri, 12 Sep 2025 16:23:56 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1757683435; b=A2KJpr1S67Cfu89oeOBFDeHniqarYHUQbfh239rCTlawZuWoOOikDfqi0sNoAuMGweScC WfXu/X7ohu8987uq93IsoUkvdvcvL3iGaQ6A80NY1hXg960r0tEbyKzLXrGo9vDtY06jDsa BofLlLSeoDFi/KOiSNkKF7KKH9Tq+66Fo+wVOAwgEhPhLXgsyivC5hZ3J0H29iUJmaWIuMq sItYvIABzYCj14gG8RxVuWVbrTJPraZXa/0DIKpNQlyPAgkGSxcsIGSnbsntepf3h4S9Kye IjOmuaS8qBqc8CpTjRMxjrhOodkNfqQ4l5kP0yOPGbegrJrrcus7O3YJpjpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1757683435; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=jE0+f5Q/+1wA0prxnmJOPRXMz9m6fhQgM+F/mfgkIcs=; b=jEJcHKNSgOLtq5uBDf2E6Gt3gMbH4bzt5n6Q22UbI98pQoRorgw1I9QXhzS0/UluX4k0/ zpTBX8+5RyfCl+HlxSQIK7ckHal4txy0IfRkd+8hKNb/kwTt8wAgHpWarFSWreIZplq204k pRDxXzupkjSGn1uDp6o8Eb4UlN9JWZRzhbt8cz1J8KZtYY+HGcP4WavWPNrOTm3VSKUHFN3 P8yt/u6XKjX8AV4duHWHYwBWTVB9v1//SOrJhLCohlbcX0XgyqFoGkcx6CHemXVHGfSP+jv F4hqZKrJ4hEGIZCYHYBMLLG/la7i9+UyCnYdTKWn1nmziIDZt5jnZrTQuvjg== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=fail; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=fail; arc=none (Message is not ARC signed); dmarc=none Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8328768E7F4 for ; Fri, 12 Sep 2025 16:23:41 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 58CDNZjF024194 for ; Fri, 12 Sep 2025 15:23:36 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id C8E7A2EFDF; Fri, 12 Sep 2025 15:23:35 +0200 (CEST) Date: Fri, 12 Sep 2025 15:23:35 +0200 To: FFmpeg development discussions and patches Message-ID: References: <20250824203654.4450A68E704@ffbox0-bg.ffmpeg.org> <829558c0-f800-6070-0d38-92f202c7a092@passwd.hu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <829558c0-f800-6070-0d38-92f202c7a092@passwd.hu> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Fri, 12 Sep 2025 15:23:36 +0200 (CEST) Message-ID-Hash: NMXMD4QEEPTSKKY2ERANI7EIWW53PTB7 X-Message-ID-Hash: NMXMD4QEEPTSKKY2ERANI7EIWW53PTB7 X-MailFrom: SRS0=5QBl=3X=phare.normalesup.org=george@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] avutil/bprint: fix av_bprint_strftime with %p format string reporting truncated output (PR #20330) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Nicolas George via ffmpeg-devel Cc: Nicolas George Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: Sorry, lots of things to do these last weeks. Marton Balint via ffmpeg-devel (HE12025-08-26): > I just thought that for the typical case we can spare an strlen() call this > way. Except if the format is pathologically long, which is not a case we want to optimize for, I suspect the branching is more expensive than the counting. > > I think a lower margin should be ok, >>4 or >>5. > I'd rather keep it >>8, because strftime format strings can also have width > specifiers, so something like "%80c" should work. Obviously this is always > going to be a heuristics, but I wanted to be careful and reject only the > very unlikely/insane format strings... I am worried that this large value can cause bprint to go beyond the built-in buffer and allocate more memory just to be sure. But we are in a pathological case anyway, so go ahead. > There is one, but OK, I will make the existing comment a bit more verbose. Thanks. Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org