Re: [PATCH 1/2] tag: factor out get_tagged_oid()

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

 



On Thu, Sep 05, 2019 at 09:55:55PM +0200, René Scharfe wrote:

> Add a function for accessing the ID of the object referenced by a tag
> safely, i.e. without causing a segfault when encountering a broken tag
> where ->tagged is NULL.

This approach seems to pretty reasonable. As somebody who's been
thinking about this, I'd be curious to hear your thoughts on:

  https://public-inbox.org/git/20190906065606.GC5122@xxxxxxxxxxxxxxxxxxxxx/

which _in theory_ means tag->tagged would never be NULL (we'd catch it
at the parsing stage and consider that an error). But we'd still
potentially want to protect ourselves as you do here for code paths
which don't necessarily check the parse result.

-Peff



[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