[5087] Fix more bugs in r5044
Revision: 5087
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5087 Author: blueswir1 Date: 2008-08-25 20:43:37 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
Fix more bugs in r5044
Modified Paths:
--------------
trunk/audio/audio.c
trunk/i386-dis.cModified: trunk/audio/audio.c
===================================================================
audio/audio.c +1 -1
@@ -205,7 +205,7 @@ } len =strlen (s); - r =qemu_malloc (len +sizeof (qemu_prefix)); + r =qemu_malloc (len +sizeof (qemu_prefix) +1 );if (r) {size_t i;
Modified: trunk/i386-dis.c
===================================================================
i386-dis.c +1 -1
@@ -2826,7 +2826,7 @@oappend (s) const char *s; { -pstrcpy (obufp, (size_t )(obufp - obuf), s); +pstrcpy (obufp,sizeof (obuf) - (size_t )(obufp - obuf), s); obufp +=strlen (s); }
Quoted 20 lines · Blue Swirl
Revision: 5087
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5087 Author: blueswir1 Date: 2008-08-25 20:43:37 +0000 (Mon, 25 Aug 2008)Log Message:
-----------
Fix more bugs in r5044Modified Paths:
--------------
trunk/audio/audio.c
trunk/i386-dis.cModified:
trunk/i386-dis.c
===================================================================
i386-dis.c 2008-08-25 20:43:37 UTC (rev 5087) line 2832
Quoted 8 lines
i386-dis.c 2008-08-25 20:43:37 UTC (rev 5087) renamed from i386-dis.c 2008-08-25 20:03:28 UTC (rev 5086) +1
-1@@ -2826,7 +2826,7 @@ oappend (s) const char *s; { - pstrcpy (obufp, (size_t)(obufp - obuf), s); + pstrcpy (obufp, sizeof(obuf) - (size_t)(obufp - obuf), s); obufp += strlen (s); }
Now the disassembler output is truncated; you need to revert this part of change to i386-dis.c
The problem is that obufp is not always a pointer into obuf data, see
i386-dis.c:2497 obufp = op1out;
Signature · 2 lines
Kind regards, Igor V. Kovalenko
Quoted 28 lines · Igor Kovalenko
Quoted 27 lines · Blue Swirl
Revision: 5087
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5087 Author: blueswir1 Date: 2008-08-25 20:43:37 +0000 (Mon, 25 Aug 2008)Log Message:
-----------
Fix more bugs in r5044Modified Paths:
--------------
trunk/audio/audio.c
trunk/i386-dis.cModified:
trunk/i386-dis.c
===================================================================i386-dis.c 2008-08-25 20:43:37 UTC (rev 5087) renamed from i386-dis.c 2008-08-25 20:03:28 UTC (rev 5086) +1
-1@@ -2826,7 +2826,7 @@ oappend (s) const char *s; { - pstrcpy (obufp, (size_t)(obufp - obuf), s); + pstrcpy (obufp, sizeof(obuf) - (size_t)(obufp - obuf), s); obufp += strlen (s); }
Quoted 8 lines
Quoted 2 lines
Now the disassembler output is truncated; you need to revert this part
of change toi386-dis.c
The problem is that obufp is not always a pointer into obuf data, see
i386-dis.c:2497 obufp = op1out;
Thanks. I didn't have a plan how to fix this properly, so I reverted it.
Quoted 19 lines · Blue Swirl
Revision: 5087
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5087 Author: blueswir1 Date: 2008-08-25 20:43:37 +0000 (Mon, 25 Aug 2008)Log Message:
-----------
Fix more bugs in r5044Modified Paths:
--------------
trunk/audio/audio.c
trunk/i386-dis.cModified:
trunk/audio/audio.c
===================================================================
audio/audio.c line 209
Quoted 6 lines
audio/audio.c +1
-1@@ -205,7 +205,7 @@ } len =strlen (s); - r =qemu_malloc (len +sizeof (qemu_prefix)); + r =qemu_malloc (len +sizeof (qemu_prefix) +1 );
This is wrong, sizeof (qemu_prefix) already includes + 1 (trailing zero is counted).
Signature · 1 line
mailto:[email protected]