Re: rpki-client refactor some path building

2020-12-18 Thread Theo Buehler
On Fri, Dec 18, 2020 at 11:42:38AM +0100, Claudio Jeker wrote: > On Thu, Dec 03, 2020 at 02:33:03PM +0100, Claudio Jeker wrote: > > Use asprintf with %.*s to construct the path based on the mft file > > location and the filename of the referenced file. > > > > Since the * field in printf(3) is exp

Re: rpki-client refactor some path building

2020-12-18 Thread Claudio Jeker
On Thu, Dec 03, 2020 at 02:33:03PM +0100, Claudio Jeker wrote: > Use asprintf with %.*s to construct the path based on the mft file > location and the filename of the referenced file. > > Since the * field in printf(3) is expecting an int type, typecast the > ptrdiff_t to an int. Add an assert che

rpki-client refactor some path building

2020-12-03 Thread Claudio Jeker
Use asprintf with %.*s to construct the path based on the mft file location and the filename of the referenced file. Since the * field in printf(3) is expecting an int type, typecast the ptrdiff_t to an int. Add an assert check to make sure there is no overflow. Also do the same overflow check in