On Fri, Jan 11, 2019 at 03:22:51PM +0530, P J P wrote: > +-- On Mon, 7 Jan 2019, P J P wrote --+ > | Qemu guest agent while executing user commands does not seem to > | check length of argument list and/or environment variables passed. > | It may lead to integer overflow or infinite loop issues. Add check > | to avoid it. > | > | - size_t str_size = 1; > | + size_t str_size = 1, args_max; > | > | + args_max = sysconf(_SC_ARG_MAX); > > Looks like sysconf()/_SC_ARG_MAX declarations aren't available. Is it okay to > include header <unistd.h> ?
qga/commands.c already includes qemu/osdep.h which includs unistd.h. The build problem patchew reported was from *mingw* builds where sysconf does not exist. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|