[dev] [sbase] [patch] Adding tar v2

From: Galos, David <galosd83_AT_students.rowan.edu>
Date: Fri, 12 Jul 2013 22:17:50 -0400

> The goto seems uncalled for. An ordinary if does the job equally well.
> Also, I wonder if a mode variable isn't just as simple as the flg array.
Good catches. I probably went through 10 permutations of argument
parsing until I found the current one, so I'm not surprised that I missed
some simplification

> Proposed patch attached. Is (argc != (mode == 'c')) too clever?
Thanks, the patch is an improvement over my initial code. That
expression is entirely acceptable.

> By the way, what is the purpose of strlcpy in xt and unarchive?
> Is it in case header fields are not properly zero terminated?
Precisely. Although the tar format requires null-termination, I
wanted to be sure that malformed archives couldn't be evil.
Received on Sat Jul 13 2013 - 04:17:50 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 13 2013 - 04:24:05 CEST