2007-08-01 14:50:21

by Bernd Schubert

[permalink] [raw]
Subject: [PATCH] e2fsck/e2fsprogs: use sscanf() instead of atoi() in the option parser

[resent since the first mail doesn't seem to make it to this list]

Hi,

using atoi() should be avoided in the option parser since it doesn't check
for errors. I almost destroyed an important filesystem since I
specified "e2fsck -C -n" and -n was parsed as option to -C


Cheers,
Bernd



Attachments:
sscanf_instead_of_atoi.patch (2.19 kB)

2007-08-04 06:02:22

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] e2fsck/e2fsprogs: use sscanf() instead of atoi() in the option parser

On Wed, Aug 01, 2007 at 04:50:04PM +0200, Bernd Schubert wrote:
> [resent since the first mail doesn't seem to make it to this list]
>
> using atoi() should be avoided in the option parser since it doesn't check
> for errors. I almost destroyed an important filesystem since I
> specified "e2fsck -C -n" and -n was parsed as option to -C

Hi Bernd,

Can you please include a DCO. i.e.,

Signed-off-by: Bernd Schubert <[email protected]>

In your patch submissions. See the SUBMITTING-PATCHES file in the
top-level directory of e2fsprogs source tree for the significance of
the Signed-off-by line. For this patch, can you indicate whether you
are willing to add a Signed-off-by: DCO?

Thanks, regards,

- Ted

2007-08-06 11:18:58

by Bernd Schubert

[permalink] [raw]
Subject: Re: [PATCH] e2fsck/e2fsprogs: use sscanf() instead of atoi() in the option parser

Hello Ted,

> In your patch submissions. See the SUBMITTING-PATCHES file in the
> top-level directory of e2fsprogs source tree for the significance of
> the Signed-off-by line. For this patch, can you indicate whether you
> are willing to add a Signed-off-by: DCO?

sorry that I did not read that file and so didn't know a signed-off is
required.

Sure I'm willing to add a signed-off :) I'm also adding the patch again to
this mail.


Signed-off-by: Bernd Schubert <[email protected]>


Cheers,
Bernd

--
Bernd Schubert
Q-Leap Networks GmbH


Attachments:
(No filename) (542.00 B)
sscanf_instead_of_atoi.patch (2.19 kB)
Download all attachments