Ticket #11717: 0001-HIDWriter-0-initialize-struct.patch

File 0001-HIDWriter-0-initialize-struct.patch, 857 bytes (added by Timothy_Gu, 7 years ago)
  • src/add-ons/kernel/drivers/input/usb_hid/HIDWriter.cpp

    From d64832145994b8d7b3952e2b79444c471fbbc63c Mon Sep 17 00:00:00 2001
    From: Timothy Gu <timothygu99@gmail.com>
    Date: Tue, 6 Jan 2015 16:33:36 -0800
    Subject: [PATCH] HIDWriter: 0-initialize struct
    
    Fixes CID 610984.
    ---
     src/add-ons/kernel/drivers/input/usb_hid/HIDWriter.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/add-ons/kernel/drivers/input/usb_hid/HIDWriter.cpp b/src/add-ons/kernel/drivers/input/usb_hid/HIDWriter.cpp
    index dc32ab2..f229085 100644
    a b HIDWriter::DefineInputPadding(uint8 count, uint8 bitLength)  
    4242    SetReportSize(bitLength);
    4343    SetReportCount(count);
    4444
    45     main_item_data data;
     45    main_item_data data = { 0 };
    4646    data.data_constant = 1;
    4747    return Input(data);
    4848}