lib: Fix integer overflowed argument issue with strtoul()