bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23825: maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstri


From: Pádraig Brady
Subject: bug#23825: maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstrict-overflow
Date: Thu, 23 Jun 2016 14:26:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 23/06/16 08:13, Paul Eggert wrote:
> Incidentally, 'yes' has a different bug: it mishandles the case where 
> 'write' succeeds but returns a value less than the buffer size. I'll try 
> to look into that too. Simplest would be to use stdio (the comments 
> indicate this has performance issues but I don't know what they are, 
> anyway correctness trumps performance).

Good spot on the yes(1) write(2) bug.
Shouldn't impact too often due to smallish BUFSIZ,
and subsequent writes catching ENOSPC,
but definitely could cause issues.

The attached should fix that up, and keep the same
performance characteristics.

cheers,
Pádraig

Attachment: yes-short-write.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]