git: contrib/flex: Guard against int overflow in sko_push().

Aaron LI aly at crater.dragonflybsd.org
Sun Sep 27 04:09:06 PDT 2026


commit d1f4fb943c73e2b61ddabff6aa48ce7551db72f4
Author: David Bidner <david at crap.solutions>
Date:   Sat Sep 26 04:57:09 2026 +0200

    contrib/flex: Guard against int overflow in sko_push().
    
    sko_sz is an int; doubling it unchecked could overflow and produce a
    huge size_t for realloc(). Bail out if it would overflow.
    
    It's sad that the upstream project hasn't had a new release since 2017,
    so we decided to directly patch the contributed source.
    
    Bug: #3426

Summary of changes:
 contrib/flex/README.DRAGONFLY | 3 +++
 contrib/flex/src/misc.c       | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d1f4fb943c73e2b61ddabff6aa48ce7551db72f4


-- 
DragonFly BSD source repository


More information about the Commits mailing list