* [Qemu-devel] [PATCH 1/3] sh4: Fix potential crash in debug code
2011-09-02 10:12 [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
@ 2011-09-02 10:12 ` Stefan Hajnoczi
2011-09-02 10:12 ` [Qemu-devel] [PATCH 2/3] x86: fix daa opcode for al register values higher than 0xf9 Stefan Hajnoczi
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-09-02 10:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi
From: Stefan Weil <weil@mail.berlios.de>
cppcheck reports this error:
qemu/hw/sh_intc.c:390: error: Possible null pointer dereference:
s - otherwise it is redundant to check if s is null at line 385
If s were NULL, the printf() statement would crash.
Setting braces fixes this bug.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
hw/sh_intc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/sh_intc.c b/hw/sh_intc.c
index ecb46e5..e07424f 100644
--- a/hw/sh_intc.c
+++ b/hw/sh_intc.c
@@ -382,13 +382,14 @@ void sh_intc_register_sources(struct intc_desc *desc,
sh_intc_register_source(desc, vect->enum_id, groups, nr_groups);
s = sh_intc_source(desc, vect->enum_id);
- if (s)
- s->vect = vect->vect;
+ if (s) {
+ s->vect = vect->vect;
#ifdef DEBUG_INTC_SOURCES
- printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",
- vect->enum_id, s->vect, s->enable_count, s->enable_max);
+ printf("sh_intc: registered source %d -> 0x%04x (%d/%d)\n",
+ vect->enum_id, s->vect, s->enable_count, s->enable_max);
#endif
+ }
}
if (groups) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/3] x86: fix daa opcode for al register values higher than 0xf9
2011-09-02 10:12 [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
2011-09-02 10:12 ` [Qemu-devel] [PATCH 1/3] sh4: Fix potential crash in debug code Stefan Hajnoczi
@ 2011-09-02 10:12 ` Stefan Hajnoczi
2011-09-02 10:12 ` [Qemu-devel] [PATCH 3/3] libcacard: use INSTALL_DATA for data Stefan Hajnoczi
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-09-02 10:12 UTC (permalink / raw)
To: qemu-devel
Cc: Boris Figovsky, Anthony Liguori, Boris Figovsky, Stefan Hajnoczi
From: Boris Figovsky <boris.figovsky@ravellosystems.com>
The second if statement should consider the original al register value,
and not the new one.
Signed-off-by: Boris Figovsky <boris.figovksy@ravellosystems.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
target-i386/op_helper.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index 1bbc3b5..1fc248f 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -1970,20 +1970,20 @@ void helper_aas(void)
void helper_daa(void)
{
- int al, af, cf;
+ int old_al, al, af, cf;
int eflags;
eflags = helper_cc_compute_all(CC_OP);
cf = eflags & CC_C;
af = eflags & CC_A;
- al = EAX & 0xff;
+ old_al = al = EAX & 0xff;
eflags = 0;
if (((al & 0x0f) > 9 ) || af) {
al = (al + 6) & 0xff;
eflags |= CC_A;
}
- if ((al > 0x9f) || cf) {
+ if ((old_al > 0x99) || cf) {
al = (al + 0x60) & 0xff;
eflags |= CC_C;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 3/3] libcacard: use INSTALL_DATA for data
2011-09-02 10:12 [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
2011-09-02 10:12 ` [Qemu-devel] [PATCH 1/3] sh4: Fix potential crash in debug code Stefan Hajnoczi
2011-09-02 10:12 ` [Qemu-devel] [PATCH 2/3] x86: fix daa opcode for al register values higher than 0xf9 Stefan Hajnoczi
@ 2011-09-02 10:12 ` Stefan Hajnoczi
2011-09-08 13:14 ` [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
2011-09-08 14:26 ` Anthony Liguori
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-09-02 10:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi, Brad Smith
From: Brad Smith <brad@comstyle.com>
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
libcacard/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libcacard/Makefile b/libcacard/Makefile
index bf052bc..81d9eb5 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -56,7 +56,7 @@ install-libcacard: libcacard.pc libcacard.la vscclient
$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
- $(LIBTOOL) --mode=install $(INSTALL_PROG) libcacard.la "$(DESTDIR)$(libdir)"
+ $(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
for inc in *.h; do \
$(LIBTOOL) --mode=install $(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011
2011-09-02 10:12 [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
` (2 preceding siblings ...)
2011-09-02 10:12 ` [Qemu-devel] [PATCH 3/3] libcacard: use INSTALL_DATA for data Stefan Hajnoczi
@ 2011-09-08 13:14 ` Stefan Hajnoczi
2011-09-08 14:26 ` Anthony Liguori
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-09-08 13:14 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Anthony Liguori, qemu-devel
On Fri, Sep 2, 2011 at 11:12 AM, Stefan Hajnoczi
<stefanha@linux.vnet.ibm.com> wrote:
> The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b:
>
> Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500)
>
> are available in the git repository at:
>
> ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches
>
> Boris Figovsky (1):
> x86: fix daa opcode for al register values higher than 0xf9
>
> Brad Smith (1):
> libcacard: use INSTALL_DATA for data
>
> Stefan Weil (1):
> sh4: Fix potential crash in debug code
>
> hw/sh_intc.c | 9 +++++----
> libcacard/Makefile | 2 +-
> target-i386/op_helper.c | 6 +++---
> 3 files changed, 9 insertions(+), 8 deletions(-)
Ping?
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011
2011-09-02 10:12 [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
` (3 preceding siblings ...)
2011-09-08 13:14 ` [Qemu-devel] [PULL 0/3] Trivial patches for Auguest 25 to September 2 2011 Stefan Hajnoczi
@ 2011-09-08 14:26 ` Anthony Liguori
4 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2011-09-08 14:26 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel
On 09/02/2011 05:12 AM, Stefan Hajnoczi wrote:
> The following changes since commit 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b:
>
> Merge remote-tracking branch 'stefanha/trivial-patches' into staging (2011-09-01 13:57:19 -0500)
>
> are available in the git repository at:
>
> ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Boris Figovsky (1):
> x86: fix daa opcode for al register values higher than 0xf9
>
> Brad Smith (1):
> libcacard: use INSTALL_DATA for data
>
> Stefan Weil (1):
> sh4: Fix potential crash in debug code
>
> hw/sh_intc.c | 9 +++++----
> libcacard/Makefile | 2 +-
> target-i386/op_helper.c | 6 +++---
> 3 files changed, 9 insertions(+), 8 deletions(-)
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread