Bug#822849: qemubuilder: fix --update by checking for the correct asprintf() return value

James Clarke jrtc27 at jrtc27.com
Thu Apr 28 11:43:16 UTC 2016


Control: tags -1 confirmed

Hi,
> On 28 Apr 2016, at 11:28, Peter Pentchev <roam at ringlet.net> wrote:
> 
> Package: qemubuilder
> Version: 0.79
> Severity: grave
> Tags: patch
> 
> Hi,
> 
> Thanks for writing and maintaining cowdancer, cowbuilder, and qemubuilder!

I didn’t write it originally, I just maintain it :)

> What do you think about the attached patch that makes "qemubuilder --update"
> actually work by checking the asprintf() return value for the correct error
> indication? :)

Thanks; good catch. I guess the lack of bug reports is an indication of
how many people actually use qemubuilder!

> Actually, the error checking after asprintf() in the whole cowdancer source
> is a bit inconsistent - some places check for < 0 (or 0>), some places check
> for the IMHO more precise == -1, some places don't check at all...   I have
> a larger change in the works that makes the checks a bit more consistent and
> introduces a couple more of them, along with some other checks, but it's not
> quite ready yet.

Yeah... Personally I prefer the < 0 checks, even if it should never
return a negative number other than -1, but not enough to go and change
== -1 to < 0 everywhere. If there are any places where error checks are
missing (which I seem to recall noticing when trawling through the code
before), patches are definitely appreciated!

Regards,
James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20160428/1e5ab731/attachment.sig>


More information about the Pbuilder-maint mailing list