Re: [PATCH 5/5] avoid crash with sym->bb_target == NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 6, 2017 at 3:19 PM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> +                       sym = expr->symbol;
> +                       if (sym->bb_target)
> +                               buf += sprintf(buf, ".L%u", sym->bb_target->nr);
You chould do:
bb = expr->symbol->target;
if (bb)
    buf +=  sprintf(buf, ".L%u", bb ? bb->nr);
else
    buf += sprintf(buf, ".L<invalid>");

It is up to you.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux