Skip to contentSkip to conversation

array overflow in hw/stellaris.c and hw/omap_dss.c

Qemu-devel Applied Jindrich Makovicka 2 participants 2 messages Jul 5, 2008 – Aug 22, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

there are some under-dimensioned arrays in $subj.

stellaris.c (working copy) renamed from stellaris.c (revision 4846) +2 -2
Index: stellaris.c
===================================================================
@@ -1308,8 +1308,8 @@
     static const int gpio_irq[7] = {0, 1, 2, 3, 4, 30, 31};
 
     qemu_irq *pic;
-    qemu_irq *gpio_in[5];
-    qemu_irq *gpio_out[5];
+    qemu_irq *gpio_in[7];
+    qemu_irq *gpio_out[7];
     qemu_irq adc;
     int sram_size;
     int flash_size;
omap_dss.c (working copy) renamed from omap_dss.c (revision 4846) +2 -1
Index: omap_dss.c
===================================================================
@@ -53,7 +53,7 @@
         uint32_t control;
         uint32_t config;
         uint32_t capable;
-        uint32_t timing[3];
+        uint32_t timing[4];
         int line;
         uint32_t bg[2];
         uint32_t trans[2];
@@ -148,6 +148,7 @@
     s->dispc.timing[0] = 0;
     s->dispc.timing[1] = 0;
     s->dispc.timing[2] = 0;
+    s->dispc.timing[3] = 0;
     s->dispc.line = 0;
     s->dispc.bg[0] = 0;
     s->dispc.bg[1] = 0;

Regards,

Signature · 1 line
Jindrich Makovicka
#1 lore raw
Quoted 4 lines · Jindrich Makovicka

Hi,

there are some under-dimensioned arrays in $subj.

Applied, thanks.

Quoted 43 lines

Index: stellaris.c
===================================================================

stellaris.c (working copy) renamed from stellaris.c (revision 4846) +2 -2
@@ -1308,8 +1308,8 @@
     static const int gpio_irq[7] = {0, 1, 2, 3, 4, 30, 31};
 
     qemu_irq *pic;
-    qemu_irq *gpio_in[5];
-    qemu_irq *gpio_out[5];
+    qemu_irq *gpio_in[7];
+    qemu_irq *gpio_out[7];
     qemu_irq adc;
     int sram_size;
     int flash_size;

Index: omap_dss.c
===================================================================

omap_dss.c (working copy) renamed from omap_dss.c (revision 4846) +2 -1
@@ -53,7 +53,7 @@
         uint32_t control;
         uint32_t config;
         uint32_t capable;
-        uint32_t timing[3];
+        uint32_t timing[4];
         int line;
         uint32_t bg[2];
         uint32_t trans[2];
@@ -148,6 +148,7 @@
     s->dispc.timing[0] = 0;
     s->dispc.timing[1] = 0;
     s->dispc.timing[2] = 0;
+    s->dispc.timing[3] = 0;
     s->dispc.line = 0;
     s->dispc.bg[0] = 0;
     s->dispc.bg[1] = 0;

Regards,

Signature · 1 line
Jindrich Makovicka
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net