[haiku-commits] haiku: hrev48306 - src/add-ons/accelerants/radeon_hd

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 15 Nov 2014 16:08:49 +0100 (CET)

hrev48306 adds 1 changeset to branch 'master'
old head: f9ac1e93fb1ba12163bff4128efb54d8e548e4a8
new head: 6a716f63ae37863fa5cc12aa2d8bccdb692d70f1
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=6a716f6+%5Ef9ac1e9

----------------------------------------------------------------------------

6a716f6: radeon_hd: Exit on GPIO pin space exhaustion
  
  * Prevents negative array index read
  * CID 1210885

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48306
Commit:      6a716f63ae37863fa5cc12aa2d8bccdb692d70f1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=6a716f6
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Sat Nov 15 14:56:40 2014 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 1 deletion(-)
src/add-ons/accelerants/radeon_hd/connector.cpp | 4 +++-

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/radeon_hd/connector.cpp 
b/src/add-ons/accelerants/radeon_hd/connector.cpp
index 2657b82..470421e 100644
--- a/src/add-ons/accelerants/radeon_hd/connector.cpp
+++ b/src/add-ons/accelerants/radeon_hd/connector.cpp
@@ -309,8 +309,10 @@ gpio_general_populate()
                        break;
                }
        }
-       if (gpioIndex < 0)
+       if (gpioIndex < 0) {
                ERROR("%s: ERROR: Out of space for additional GPIO pins!\n", 
__func__);
+               return B_ERROR;
+       }
 
        ATOM_GPIO_PIN_ASSIGNMENT* pin = gpioInfo->asGPIO_Pin;
        for (int i = 0; i < numIndices; i++) {


Other related posts:

  • » [haiku-commits] haiku: hrev48306 - src/add-ons/accelerants/radeon_hd - kallisti5