public inbox for insight-prs@sourceware.org
help / color / mirror / Atom feed
* insight/332: Please check some function return codes
@ 2008-11-05 23:13 dktrkranz
0 siblings, 0 replies; only message in thread
From: dktrkranz @ 2008-11-05 23:13 UTC (permalink / raw)
To: insight-gnats
>Number: 332
>Category: insight
>Synopsis: Please check some function return codes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 05 23:13:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: dktrkranz@ubuntu.com
>Release: 6.7.1
>Organization:
>Environment:
>Description:
Some function do not check return codes, this causes insight to fail to build from source in Ubuntu. Attached patch should fix this, you can test it passing -D_FORTIFY_SOURCE=2 to gcc.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="05_ubuntu_toolchain_FTBFS.dpatch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="05_ubuntu_toolchain_FTBFS.dpatch"
IyEgL2Jpbi9zaCAvdXNyL3NoYXJlL2RwYXRjaC9kcGF0Y2gtcnVuCiMjIDA1X3VidW50dV90b29s
Y2hhaW5fRlRCRlMuZHBhdGNoIGJ5ICA8ZGt0cmtyYW56QHVidW50dS5jb20+CiMjIERQOiBGaXgg
RlRCRlMgd2l0aCBVYnVudHUgdG9vbGNoYWluLgojIyBEUDogCgpARFBBVENIQApkaWZmIC11ck5h
ZCBpbnNpZ2h0LTYuNy4xLmRmc2cuMX4vZ2RiL2NsaS9jbGktY21kcy5jIGluc2lnaHQtNi43LjEu
ZGZzZy4xL2dkYi9jbGkvY2xpLWNtZHMuYwotLS0gaW5zaWdodC02LjcuMS5kZnNnLjF+L2dkYi9j
bGkvY2xpLWNtZHMuYwkyMDA3LTA4LTIzIDIwOjA4OjQ3LjAwMDAwMDAwMCArMDIwMAorKysgaW5z
aWdodC02LjcuMS5kZnNnLjEvZ2RiL2NsaS9jbGkt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XRpYyB2b2lkCmRpZmYgLXVyTmFkIGluc2lnaHQtNi43LjEuZGZz
Zy4xfi9nZGIvdXRpbHMuYyBpbnNpZ2h0LTYuNy4xLmRmc2cuMS9nZGIvdXRpbHMuYwotLS0gaW5z
aWdodC02LjcuMS5kZnNnLjF+L2dkYi91dGlscy5jCTIwMDctMDgtMjMgMjA6MDg6NDYuMDAwMDAw
MDAwICswMjAwCisrKyBpbnNpZ2h0LTYuNy4xLmRmc2cuMS9nZGIvdXRpbHMuYwkyMDA4LTA4LTA0
IDAzOjM3OjQ0LjAwMDAwMDAwMCArMDIwMApAQCAtNzAwLDYgKzcwMCw3IEBACiAgIHN0YXRpYyBp
bnQgZGVqYXZ1OwogICBpbnQgcXVpdF9wOwogICBpbnQgZHVtcF9jb3JlX3A7CisgIGludCBydjsK
ICAgY2hhciAqcmVhc29uOwogCiAgIC8qIERvbid0IGFsbG93IGluZmluaXRlIGVycm9yL3dhcm5p
bmcgcmVjdXJzaW9uLiAgKi8KQEAgLTcxNiw3ICs3MTcsNyBAQAogCWFib3J0ICgpOwkvKiBOT1RF
OiBHREIgaGFzIG9ubHkgdGhyZWUgY2FsbHMgdG8gYWJvcnQoKS4gICovCiAgICAgICBkZWZhdWx0
OgogCWRlamF2dSA9IDM7Ci0Jd3JpdGUgKFNUREVSUl9GSUxFTk8sIG1zZywgc2l6ZW9mIChtc2cp
KTsKKwlydiA9IHdyaXRlIChTVERFUlJfRklMRU5PLCBtc2csIHNpemVvZiAobXNnKSk7CiAJZXhp
dCAoMSk7CiAgICAgICB9CiAgIH0K
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-05 23:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-05 23:13 insight/332: Please check some function return codes dktrkranz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).