Ticket #11751: 0001-CID-515039-Copy-into-fixed-size-buffer-Added-buffer-.patch

File 0001-CID-515039-Copy-into-fixed-size-buffer-Added-buffer-.patch, 868 bytes (added by sli908, 9 years ago)

Patch that adds buffer size check

  • src/bin/gdb/opcodes/i386-dis.c

    From 190550a1535bd2a9cf3e833eefad29826b6786c7 Mon Sep 17 00:00:00 2001
    From: Sid Kurella <mastersidkurella@gmail.com>
    Date: Tue, 13 Jan 2015 11:40:07 -0500
    Subject: [PATCH] CID 515039: Copy into fixed size buffer - Added buffer size
     check
    
    ---
     src/bin/gdb/opcodes/i386-dis.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/bin/gdb/opcodes/i386-dis.c b/src/bin/gdb/opcodes/i386-dis.c
    index 66fd388..0dcfc03 100644
    a b dofloat (int sizeflag)  
    26672667      putop (fgrps[dp->bytemode1][rm], sizeflag);
    26682668
    26692669      /* Instruction fnstsw is only one with strange arg.  */
    2670       if (floatop == 0xdf && codep[-1] == 0xe0)
     2670      if (floatop == 0xdf && codep[-1] == 0xe0 && sizeof(names16[0]) < sizeof(op1out))
    26712671    strcpy (op1out, names16[0]);
    26722672    }
    26732673  else