From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 0D9A726B85 for ; Fri, 10 May 2024 18:13:25 +0200 (CEST) Received: (qmail 11502 invoked by uid 550); 10 May 2024 16:13:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15429 invoked from network); 10 May 2024 16:02:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715356929; x=1715961729; darn=lists.openwall.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=PEPapxtgT7UYPtL5gQp+31Echh+W/rjIG+laozwdjmM=; b=QEptrYcpEeQ+BYr/51Zbl2fLEFvUbYeEfqdnLDt5BVRXV6P00JNrhn4vAdkqUF4xbB /zy4QLLqI3pK0OTtGXIdjPkRXFVkGO170HSBoagTIBVaI3wA4tZumHxqXVx2W4IE5SIT f45r12F020zNIJHCWKEGivVlayKMu0/RKkdshyVxnR5GhIC403WRckL4YyRHDkKPfmju IlzhT7b6X9rOJseu7nPiE+n7OeH54Fv1Am8ngfw6q8Baf4xJfZaWb5Q44tXJSmo8g7iY 1Ns9dWKBcPjpI30uhwiQufLJTOMRr+0MaXVoFhcMFfHvsFlyz2T0WU4KI+1OlTxsUUep hblQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715356929; x=1715961729; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PEPapxtgT7UYPtL5gQp+31Echh+W/rjIG+laozwdjmM=; b=h6g7BV6CQ09nSWi6BH2xBISw14NEpFdbAh06XtSIuiQyalThSq+WuW5rBFPrOEKHmN QFJ9rdUOsImwsPvNniPRkqG5JQ6z1C5CyUpoc34QDOVLMaIfXee1I2DwZXkjHJHxnFz0 Xu1iYZFRPJBhIk2LRn3okPLssysET0TdB+MuCkD3TPerfAwXczExbi6Rdn3fomv6GsaG TZJwf4AQhCYfXMz1JIwu+MZSdcHxcrc0a1wKnYjQLTVy04Xn1wk1KotNfWPJmlVcooB8 Ax2wlVRXiRH1LziAhV5q9UcXBJTX++uammURSFyJExoaCSfDMmrBh/7ov82kHD+77Kme fWLw== X-Gm-Message-State: AOJu0YwQwkBcC9jgoPBwLldgrYWxTHHnsOr+rMhnqPrHqRfciT0xPjFF 0H4+/45CauFIA0140DYaxbrMJjKRcK81AErT5kQlVmN5oa/PYtdk2t6OzEtfHPV/9x32d1bAfmB Mn7fMCzWibQXyYxVzasByYBZhfDIN83ze X-Google-Smtp-Source: AGHT+IHhQuHiS5lWYUZgwC0JaWJozZg/yjXJadsSWEgoYdpWzlWQiSAvdl7DUQiZI3mahuin2XzIVAnCW+1Ehim+bws= X-Received: by 2002:a50:d496:0:b0:572:42ac:9b19 with SMTP id 4fb4d7f45d1cf-5734d440712mr2122146a12.0.1715356929221; Fri, 10 May 2024 09:02:09 -0700 (PDT) MIME-Version: 1.0 From: Florian Ziesche Date: Fri, 10 May 2024 18:01:58 +0200 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: [musl] [PATCH] dynlink: fix get_lfs64() with posix_fallocate64 Hi, this patch increases the buffer size by one in get_lfs64() so that it works with posix_fallocate64. "posix_fallocate64" is 17 characters long, so 16 is one too short. Simplified example: before: https://compiler-explorer.com/z/4qcPhcaWr after: https://compiler-explorer.com/z/scGvhddKW --- diff --git a/ldso/dynlink.c b/ldso/dynlink.c index 42687da2..8707ae1c 100644 --- a/ldso/dynlink.c +++ b/ldso/dynlink.c @@ -363,7 +363,7 @@ static struct symdef get_lfs64(const char *name) "stat\0statfs\0statvfs\0tmpfile\0truncate\0versionsort\0" "__fxstat\0__fxstatat\0__lxstat\0__xstat\0"; size_t l; - char buf[16]; + char buf[17]; for (l=0; name[l]; l++) { if (l >= sizeof buf) goto nomatch; buf[l] = name[l];