[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/11] net: Real fix for check_params users
From: |
Mark McLoughlin |
Subject: |
Re: [Qemu-devel] [PATCH 04/11] net: Real fix for check_params users |
Date: |
Thu, 28 May 2009 16:04:32 +0100 |
On Fri, 2009-05-08 at 12:34 +0200, Jan Kiszka wrote:
> OK, last try: ea053add70 broke -net socket, ffad4116b9 tried to fix it
> but broke error reporting of invalid parameters. So this patch widely
> reverts ffad4116b9 again and intead fixes those callers of check_params
> that originally suffered from overwritten buffers by using separate
> ones.
>
> Signed-off-by: Jan Kiszka <address@hidden>
Okay, I think we should revert Kevin's fix from master and replace it
with this one.
> @@ -1944,12 +1944,12 @@ int net_client_init(const char *device, const char *p)
> #elif defined (_AIX)
> #else
> if (!strcmp(device, "tap")) {
> - char ifname[64];
> + char ifname[64], chkbuf[64];
> char setup_script[1024], down_script[1024];
> int fd;
> vlan->nb_host_devs++;
> if (get_param_value(buf, sizeof(buf), "fd", p) > 0) {
> - if (check_params(fd_params, p) < 0) {
> + if (check_params(chkbuf, sizeof(chkbuf), fd_params, p) < 0) {
> fprintf(stderr, "qemu: invalid parameter '%s' in '%s'\n",
> buf, p);
Should use chkbuf in the fprintf.
Following up with a patch series.
Cheers,
Mark.
[Qemu-devel] [PATCH 06/11] slirp: Reorder initialization, Jan Kiszka, 2009/05/08
[Qemu-devel] [PATCH 02/11] net: Fix and improved ordered packet delivery, Jan Kiszka, 2009/05/08
[Qemu-devel] [PATCH 08/11] slirp: Move smb, redir, tftp and bootp parameters and -net channel, Jan Kiszka, 2009/05/08