On Fri, Aug 08, 2014 at 11:31:07AM +0200, Peter Wu wrote:
Hi,
Here are more fixes for bugs caught my Clang static analyzer. Two bugs are remaining, namely a memleak in the perl bindings. I am not an expert in that area and did not manage to fix it in a correct way, so I will just describe it.
Thanks - pushed both.
The ASetValues and ASetValue functions call a function which allocates memory. The generated code puts this before PREINIT. Then there is the typemap for hive_h object. This code can return if the validation fails which causes a memleak.
So, could some Perl programmer pick this up?
I'm not super-worried by this as: - It's only a memory leak. - It doesn't seem to be exploitable. - It can be avoided easily by not passing a bogus handle in Perl methods. - Fixing it is complex and is most likely to introduce real bugs. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org