* [Patch] fix checking strtab length in xc_core.c
@ 2007-09-10 12:16 Akio Takebe
2007-09-10 12:20 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Akio Takebe @ 2007-09-10 12:16 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 666 bytes --]
Hi,
I don't understard the meaning of the following check in xc_core.c.
Is this correct patch?
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
diff -r 9071521d4864 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c Fri Sep 07 11:39:10 2007 +0100
+++ b/tools/libxc/xc_core.c Tue Sep 11 06:13:55 2007 +0900
@@ -107,7 +107,7 @@ xc_core_strtab_get(struct xc_core_strtab
if ( strtab->current + len > strtab->max )
{
char *tmp;
- if ( strtab->max * 2 < strtab->max )
+ if ( strtab->current + len > strtab->max * 2 )
{
PERROR("too long string table");
errno = ENOMEM;
Best Regards,
Akio Takebe
[-- Attachment #2: fix_xc_core_strtab_len.patch --]
[-- Type: application/octet-stream, Size: 485 bytes --]
diff -r 9071521d4864 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c Fri Sep 07 11:39:10 2007 +0100
+++ b/tools/libxc/xc_core.c Tue Sep 11 06:13:55 2007 +0900
@@ -107,7 +107,7 @@ xc_core_strtab_get(struct xc_core_strtab
if ( strtab->current + len > strtab->max )
{
char *tmp;
- if ( strtab->max * 2 < strtab->max )
+ if ( strtab->current + len > strtab->max * 2 )
{
PERROR("too long string table");
errno = ENOMEM;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-10 12:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10 12:16 [Patch] fix checking strtab length in xc_core.c Akio Takebe
2007-09-10 12:20 ` Keir Fraser
2007-09-10 12:33 ` Akio Takebe
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.