[Libvir] Fix for buffer overflow in network setup

There was a buffer overflow in teh code to deal with building command line arguments which was only exposed when the Fedora RPM builds uses the stack protector args to GCC. The attached patch increases the buffer size and uses snprintf() instead of sprintf(). BTW, if anyone is looking for a patch to write - removing all other calls to sprintf() would be a worthy task :-) Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Tue, Mar 20, 2007 at 04:27:14PM +0000, Daniel P. Berrange wrote:
There was a buffer overflow in teh code to deal with building command line arguments which was only exposed when the Fedora RPM builds uses the stack protector args to GCC. The attached patch increases the buffer size and uses snprintf() instead of sprintf().
Please apply !
BTW, if anyone is looking for a patch to write - removing all other calls to sprintf() would be a worthy task :-)
Added to TODO in my checkout, I may end up doing it, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard