AgentD / squashfs-tools-ng

A new set of tools and libraries for working with SquashFS images
Other
194 stars 30 forks source link

Increment pointer #23

Closed ulziibuyan closed 4 years ago

ulziibuyan commented 4 years ago

Without incrementing dst, the pointer would be pointing at the second last character and it would turn filenames such as ./ into empty string later by*dst = 0; I'm assuming . filenames are valid as they do exist in tar archives.

AgentD commented 4 years ago

This was discussed in issue #22. I left it open for now, in case somebody has a better idea or can point out where my reasoning is flawed.

Outside tar balls, AFAIK you definitely don't want a directory entry named . in a filesystem. There would be no way to access its contents (see path_resoultion(7)).