as upstream repository seems dead, i post the patch there: in src/aarender.c, function aa_renderpalette, in case of an allocation error, an attempt to free a buffer _after_ the pointer has been moved can be seen in the build logs: media-libs/aalib-1.4_rc5-r9/work/aalib-1.4.0/src/aarender.c:69:13: warning: 'free' called on pointer '_15' with nonzero offset 12 [-Wfree-nonheap-object] A quite obvious fix is to move the pointer after the possible error case. Reproducible: Always Steps to Reproduce: 1. Build media-libs/aalib 2. Check the build logs 3. Actual Results: Warning about invalid freed object in src/aarender.c Expected Results: no such warning
Created attachment 851842 [details, diff] Bugfix: move the (maybeà freed pointer after the possible error case
I wish all bugs were as easy as this. Thank you for the patch, I'll add it shortly.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1fe964780a082775839a682dcbc4b600dc44042 commit d1fe964780a082775839a682dcbc4b600dc44042 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2023-02-24 12:19:47 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2023-02-24 16:49:57 +0000 media-libs/aalib: patch a free-offset-pointer bug While at it, update EAPI 7 -> 8 and drop IUSE=static-libs. Thanks-to: Jocelyn Mayer <l_indien@mailmagic.fr> Closes: https://bugs.gentoo.org/894978 Signed-off-by: Marek Szuba <marecki@gentoo.org> media-libs/aalib/aalib-1.4_rc5-r10.ebuild | 68 ++++++++++++++++++++++ .../files/aalib-1.4_rc5-free-offset-pointer.patch | 14 +++++ 2 files changed, 82 insertions(+)