In function handle_modversions , 680-683, char *munged = strdup(symname); munged[0] = '_'; munged[1] = toupper(munged[1]); symname = munged; Function strdup will return a NULL pointer if an error occurs. Thus the return value of strdup should be checked. Otherwise the dereference of munged may be a Null Pointer Deref.