Replaced `sprintf` with `snprintf` in gnb_config.c to enhance memory safety by preventing potential buffer overflows. `sprintf` can cause buffer overflows by not checking the destination buffer size. In contrast, `snprintf` allows specifying a maximum buffer size, ensuring no overflow occurs by limiting the number of characters written, including the null terminator.