Ticket #10221: 0001-Initializing-pointers-to-prevent-arbitrary-memory-re.patch

File 0001-Initializing-pointers-to-prevent-arbitrary-memory-re.patch, 1002 bytes (added by Ezodev, 11 years ago)
  • src/add-ons/kernel/drivers/input/usb_hid/TabletProtocolHandler.cpp

    From 960e9242b52bb853e1edde805f6d41103ef5303e Mon Sep 17 00:00:00 2001
    From: Ezo <ezo.dev@gmail.com>
    Date: Mon, 18 Nov 2013 22:54:52 +0000
    Subject: [PATCH] Initializing pointers to prevent arbitrary memory read
    
    ---
     src/add-ons/kernel/drivers/input/usb_hid/TabletProtocolHandler.cpp | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/src/add-ons/kernel/drivers/input/usb_hid/TabletProtocolHandler.cpp b/src/add-ons/kernel/drivers/input/usb_hid/TabletProtocolHandler.cpp
    index 936584f..2aad5a1 100644
    a b TabletProtocolHandler::AddHandlers(HIDDevice &device, HIDCollection &collection,  
    148148
    149149    uint32 inputReportCount = 0;
    150150    HIDReport *inputReports[maxReportCount];
     151    for(uint32 i = 0; i < maxReportCount; i++)
     152        inputReports[i] = NULL;
    151153    collection.BuildReportList(HID_REPORT_TYPE_INPUT, inputReports,
    152154        inputReportCount);
    153155