Fixed thread-safe bug in th_get_pathname()
commit79f6bec8433958f35563ea3f6e3e350eff1e6176
authorSergey Zhitomirsky <szhbug@gmail.com>
Fri, 29 Mar 2013 05:33:08 +0000 (29 01:33 -0400)
committerChris Frey <cdfrey@foursquare.net>
Fri, 29 Mar 2013 05:33:08 +0000 (29 01:33 -0400)
tree891aa2e75e4e56cd5eff47a2938f3ba3be589a42
parent9e771b20e7daf081bd764c2121c5e990c56ab35d
Fixed thread-safe bug in th_get_pathname()

Current libtar breaks in multi-thread app, when reading more then 1
tar simultaneously in different threads, one thread may erroneously
receive the filename for the other thread due to returned static
variable.

This bug was was introduced with the patch with the name "Fix memory
leak in th_get_pathname", which removed strdup() from
th_get_pathname() and made filename static.
lib/decode.c