Re: [PATCH] fsck: avoid looking at NULL blob->object

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

 



On 9 June 2018 at 10:32, Jeff King <peff@xxxxxxxx> wrote:
> Except it _does_ do one non-trivial thing, which is call the
> report() function, which wants us to pass a pointer to a
> "struct object". Which we don't have (we have only a "struct
> object_id"). So we erroneously passed the NULL object, which

s/passed/dereferenced/? Probably doesn't affect the fix though.

> ends up segfaulting.

>                 blob = lookup_blob(oid);
>                 if (!blob) {
> -                       ret |= report(options, &blob->object,
> +                       struct object *obj = lookup_unknown_object(oid->hash);
> +                       ret |= report(options, obj,
>                                       FSCK_MSG_GITMODULES_BLOB,
>                                       "non-blob found at .gitmodules");



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux