* [PATCH] incorrect memset usage.
@ 2005-03-31 6:21 Dave Jones
0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2005-03-31 6:21 UTC (permalink / raw)
To: xen-devel
two patches, one for stable, one for unstable..
memset args are swapped..
Dave
--- xen-2.0.bk/tools/libxutil/sys_net.c~ 2005-03-31 01:11:27.852264603 -0500
+++ xen-2.0.bk/tools/libxutil/sys_net.c 2005-03-31 01:11:39.320054735 -0500
@@ -310,7 +310,7 @@ char *mac_ntoa(const unsigned char *mac)
static char buf[MAC_LENGTH + 1];
int buf_n = sizeof(buf);
- memset(buf, buf_n, 0);
+ memset(buf, 0, buf_n);
snprintf(buf, buf_n, "%02x:%02x:%02x:%02x:%02x:%02x",
mac[0], mac[1], mac[2],
mac[3], mac[4], mac[5]);
--- xeno-unstable.bk/tools/libxutil/sys_net.c~ 2005-03-31 01:18:50.981164430 -0500
+++ xeno-unstable.bk/tools/libxutil/sys_net.c 2005-03-31 01:19:00.901236556 -0500
@@ -310,7 +310,7 @@ char *mac_ntoa(const unsigned char *mac)
static char buf[MAC_LENGTH + 1];
int buf_n = sizeof(buf);
- memset(buf, buf_n, 0);
+ memset(buf, 0, buf_n);
snprintf(buf, buf_n, "%02x:%02x:%02x:%02x:%02x:%02x",
mac[0], mac[1], mac[2],
mac[3], mac[4], mac[5]);
--- xeno-unstable.bk/tools/ioemu/iodev/harddrv.cc~ 2005-03-31 01:19:11.627152192 -0500
+++ xeno-unstable.bk/tools/ioemu/iodev/harddrv.cc 2005-03-31 01:19:22.851971006 -0500
@@ -3666,7 +3666,7 @@ ssize_t sparse_image_t::read_page_fragme
}
else
{
- memset(buf, read_size, 0);
+ memset(buf, 0, read_size);
}
}
else
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [PATCH] incorrect memset usage.
@ 2005-04-05 6:58 Ian Pratt
2005-04-05 16:19 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Ian Pratt @ 2005-04-05 6:58 UTC (permalink / raw)
To: Dave Jones, xen-devel
I think these have already been applied, no?
Thanks,
Ian
> --- xen-2.0.bk/tools/libxutil/sys_net.c~ 2005-03-31
> 01:11:27.852264603 -0500
> +++ xen-2.0.bk/tools/libxutil/sys_net.c 2005-03-31
> 01:11:39.320054735 -0500
> @@ -310,7 +310,7 @@ char *mac_ntoa(const unsigned char *mac)
> static char buf[MAC_LENGTH + 1];
> int buf_n = sizeof(buf);
>
> - memset(buf, buf_n, 0);
> + memset(buf, 0, buf_n);
> snprintf(buf, buf_n, "%02x:%02x:%02x:%02x:%02x:%02x",
> mac[0], mac[1], mac[2],
> mac[3], mac[4], mac[5]);
>
>
>
>
>
> --- xeno-unstable.bk/tools/libxutil/sys_net.c~
> 2005-03-31 01:18:50.981164430 -0500
> +++ xeno-unstable.bk/tools/libxutil/sys_net.c 2005-03-31
> 01:19:00.901236556 -0500
> @@ -310,7 +310,7 @@ char *mac_ntoa(const unsigned char *mac)
> static char buf[MAC_LENGTH + 1];
> int buf_n = sizeof(buf);
>
> - memset(buf, buf_n, 0);
> + memset(buf, 0, buf_n);
> snprintf(buf, buf_n, "%02x:%02x:%02x:%02x:%02x:%02x",
> mac[0], mac[1], mac[2],
> mac[3], mac[4], mac[5]);
> --- xeno-unstable.bk/tools/ioemu/iodev/harddrv.cc~
> 2005-03-31 01:19:11.627152192 -0500
> +++ xeno-unstable.bk/tools/ioemu/iodev/harddrv.cc
> 2005-03-31 01:19:22.851971006 -0500
> @@ -3666,7 +3666,7 @@ ssize_t sparse_image_t::read_page_fragme
> }
> else
> {
> - memset(buf, read_size, 0);
> + memset(buf, 0, read_size);
> }
> }
> else
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] incorrect memset usage.
2005-04-05 6:58 Ian Pratt
@ 2005-04-05 16:19 ` Dave Jones
0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2005-04-05 16:19 UTC (permalink / raw)
To: Ian Pratt; +Cc: xen-devel
On Tue, Apr 05, 2005 at 07:58:52AM +0100, Ian Pratt wrote:
>
> I think these have already been applied, no?
> Thanks,
> Ian
Only in the unstable tree.
This one..
> > --- xen-2.0.bk/tools/libxutil/sys_net.c~ 2005-03-31
> > 01:11:27.852264603 -0500
> > +++ xen-2.0.bk/tools/libxutil/sys_net.c 2005-03-31
> > 01:11:39.320054735 -0500
> > @@ -310,7 +310,7 @@ char *mac_ntoa(const unsigned char *mac)
> > static char buf[MAC_LENGTH + 1];
> > int buf_n = sizeof(buf);
> >
> > - memset(buf, buf_n, 0);
> > + memset(buf, 0, buf_n);
> > snprintf(buf, buf_n, "%02x:%02x:%02x:%02x:%02x:%02x",
> > mac[0], mac[1], mac[2],
> > mac[3], mac[4], mac[5]);
> >
Still isn't it seems..
(12:16:09:davej@mesh:xen-2.0.bk)$ bk pull
Pull bk://xen.bkbits.net/xen-2.0.bk
-> file://home/davej/xen-2.0.bk
Nothing to pull.
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-05 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-31 6:21 [PATCH] incorrect memset usage Dave Jones
-- strict thread matches above, loose matches on Subject: below --
2005-04-05 6:58 Ian Pratt
2005-04-05 16:19 ` Dave Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.