git: fix: iconv: move NULL checks before pointer arithmetic in iconvctl()

Matthew Dillon dillon at crater.dragonflybsd.org
Fri May 22 18:47:07 PDT 2026


commit 3346037b6118a8afa8434ca1748861eacf9c98dc
Author: Abdelkader Boudih <dragonflybsd at seuros.com>
Date:   Sat May 23 00:58:17 2026 +0000

    fix: iconv: move NULL checks before pointer arithmetic in iconvctl()
    
    strchr() result was used in pointer arithmetic and incremented before
    being checked for NULL. Move the guards above the strlcpy() call.

Summary of changes:
 lib/libc/iconv/iconv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3346037b6118a8afa8434ca1748861eacf9c98dc


-- 
DragonFly BSD source repository


More information about the Commits mailing list