DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 53T5jRfP1282533 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 53T5jRfP1282533 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=MUwnHKMn X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 414E23858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1745905525; bh=QLnY+EpqSgerrF9r6tJUhqZjRpCyyJ+oWu2ISQb3qIA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=MUwnHKMnqkf9/el9dptXoxbVQ2gaYAz1klEDibWr3mexwM69DGtElUWBRTJwQxpXA DqWuIwuw7Oe4EIJLSsGJ7UDo7pWJKwZdyNaoxuuzD5xO1RGC9MvZ6vI2k+kfLyC6/q z3ohcZ3kZmaYwNyQIJ/8TqUB6njM9LXyLNCWun90= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B56D3858D26 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0B56D3858D26 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745905501; cv=none; b=F4EgElmBBQbrxouXyPWa+507KXX0BRqewpsUDfomzVxhR/Oq5WVMWMn8sTaZRicQxltOW9I3UTn0hkpdwQYmYdtmpTvQrsY2bMUKjZjAh0a0ptAg69GgtkWvksiEYt5Q287iSc9affJpNAjPDAgPtKZfJYvpDpOxiwb0Ko9/in4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745905501; c=relaxed/simple; bh=LctN2sLaB2gRok5Kfa8dYXJB+cP8ud5crtWp3pRaNvw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=SNNF6eggnPu/gaS9iE/b3nQBqTsietd2lv73cKwojdT4qPPmipmstYzOGPqxCgzVlyQmGloVr84yqlBWKKUS5DEe6PGX8aifI+uG/YqlTfTk1NQcq1x2grg/0puG/QhzaYkssW80E+wb1CtL+QgiWsOBArvw5ioMvXLaWuwFR4I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B56D3858D26 Date: Mon, 28 Apr 2025 22:45:00 -0700 (PDT) X-X-Sender: jeremyd AT resin DOT csoft DOT net To: cygwin AT cygwin DOT com Subject: cygwin_conv_path with size 0 Message-ID: <9c8107b6-a040-d956-2590-ede1517bc2ad@jdrake.com> MIME-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeremy Drake via Cygwin Reply-To: Jeremy Drake Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" I was just describing cygwin_conv_path on a rust issue (https://github.com/rust-lang/backtrace-rs/pull/704). I was saying that the pointer `to` is not accessed when `size` is 0, but it turns out on circa line 4022 in path.cc to = (void *) wcpcpy ((wchar_t *) to, ro_u_globalroot.Buffer); This is before `size` is checked and lsiz returned if it was zero, or ENOSPC set if size is too small, circa line 4060. This seems like a bug to me. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple