Bug#509167: mdadm: check asprintf() return codes
Dustin Kirkland
kirkland at canonical.com
Tue Jan 6 00:52:50 UTC 2009
On Fri, 2008-12-19 at 16:02 +1100, Neil Brown wrote:
> I'm not really keen on taking this sort of patch.
> It isn't clear that an abort (caused by the assert) is really much
> better than just segfaulting normally ... though you do get a message
> I guess.
> But it makes the code rather ugly.
>
> Maybe if you defined a asprintf_nofail (possibly an inline in mdadm.h)
> and called that it would be acceptable.
Hi Neil, et al-
I have an updated patch attached.
I actually called the function xasprintf(), as that seems to be used
elsewhere.
I have verified that this code builds, but I have not functionally
tested it.
Perhaps you're more willing to accept something like this?
--
:-Dustin
Dustin Kirkland
Ubuntu Server Developer
Canonical, LTD
kirkland at canonical.com
GPG: 1024D/83A61194
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.diff
Type: text/x-patch
Size: 1835 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20090105/e061935d/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20090105/e061935d/attachment.pgp
More information about the pkg-mdadm-devel
mailing list