• Peter Barker's avatar
    ccanlint: avoid segfault when module_builds' linking fails · bdb8d751
    Peter Barker authored
    In the case that the objects built but linking failed, module_builds.c
    called score_file_error with a NULL ccan_file object and 0 for line
    number.
    
    score_file_error assumed that the ccan_file object it is passed was
    not-NULL when appending file errors to the score's aggregate error
    string.  It attempted to dereference it to get "fullname".
    
    score_error was factored out from score_file_error.  It takes a
    "source" parameter, which is the file's full name (and possibly line
    number) in the score_file_error case, and the ccan module name in the
    case of link failure.
    bdb8d751
module_builds.c 1.62 KB