Re: [hackers] [farbfeld] Remove dimension checks || FRIGN

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Sun, 10 Apr 2016 23:49:49 +0100

On Sun, Apr 10, 2016 at 10:59:28PM +0200, git_AT_suckless.org wrote:
> commit 96faf20b1bcef354e6b1fd03a26c286070c52e74
> Author: FRIGN <dev_AT_frign.de>
> AuthorDate: Sun Apr 10 22:54:42 2016 +0200
> Commit: FRIGN <dev_AT_frign.de>
> CommitDate: Sun Apr 10 22:54:42 2016 +0200
>
> Remove dimension checks
>
> This may come as a surprise, but I'd like the libraries to handle
> these cases.
> Maybe some day libpng supports 0x0 images, so why impose artificial
> limits here?
> Same with ppm.
>
> For me, an ideal data converter loses as little information as possible.
> In mixed cases (dimensions 0xn, where n > 0) we could print a warning,
> but here, 2 principles come at play:
> - GIGO (garbage in, garbage out)
> - no information loss if possible
> Given the code later on won't try to access the malloc(0) region, we
> are also all safe.

One problem I see with this approach is that an error will potentially go
unnoticed and require more time to diagnose than necessary.
Received on Mon Apr 11 2016 - 00:49:49 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 11 2016 - 01:00:20 CEST