• H
    easylogo: avoid buffer overrun · cd1db463
    Heinrich Schuchardt 提交于
    Building easylogo with `HOST_TOOLS_ALL=y make tools` results in a build
    warning due to a possible buffer overrun:
    
    tools/easylogo/easylogo.c:453:4: note: ‘sprintf’ output between 7 and
    262 bytes into a destination of size 256
        sprintf (str, "%s, 0x%02x", app, *dataptr++);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Truncate the output to fit into the destination buffer.
    Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
    cd1db463
easylogo.c 13.6 KB