perfcount: Fix CID 1035494 Out-of-bounds read
authorVolker Lendecke <vl@samba.org>
Thu, 5 Mar 2015 10:12:38 +0000 (11:12 +0100)
committerIra Cooper <ira@samba.org>
Thu, 5 Mar 2015 17:28:44 +0000 (18:28 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Thu Mar  5 18:28:44 CET 2015 on sn-devel-104

source3/modules/perfcount_test.c

index 86d44ef845d140a7dd8f40866917d799f7338774..0dc073cec7e281695b35b988735365c9befc33a8 100644 (file)
@@ -138,7 +138,7 @@ static const char *smb_subop_name(int op, int subop)
                }
                return trans_subop_table[subop];
        } else if (op == 0x32) {
-               if (subop > sizeof(trans2_subop_table) /
+               if (subop >= sizeof(trans2_subop_table) /
                    sizeof(trans2_subop_table[0])) {
                        return "unknown";
                }