restore: don't corrupt stack for a zero-length command-line argument
authorJim Meyering <meyering@redhat.com>
Fri, 20 Apr 2012 19:27:24 +0000 (21:27 +0200)
committerHugo Mills <hugo@carfax.org.uk>
Tue, 5 Jun 2012 18:56:20 +0000 (19:56 +0100)
commit47f029cc8bcf5a03ef6ee939fcb64007aafa50c4
tree834804c3cc9079b1308d0c12c7fcec73d4506628
parent6fc24e4a701397ca2bfc4bfc8dd5da813f9ab24d
restore: don't corrupt stack for a zero-length command-line argument

Given a zero-length directory name, the trailing-slash removal
code would test dir_name[-1], and if it were found to be a slash,
would set it to '\0'.

Reviewed-by: Josef Bacik <josef@redhat.com>
restore.c