Fix eventual memory override and fd exhaustion in create.c
commit6f02669c7ba8da9d9bd0592b8c4f87f399e60061
authorSergey Poznyakoff <gray@gnu.org.ua>
Mon, 8 Mar 2010 10:27:23 +0000 (8 12:27 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Mon, 8 Mar 2010 10:27:23 +0000 (8 12:27 +0200)
tree609ffdf14a77c043b290eae3adba59aecb864952
parente1e1f87eb43d1a23380e3253abded7ee8b3d7660
Fix eventual memory override and fd exhaustion in create.c
Both bugs reported by Kamil Dudka.

* src/create.c (check_exclusion_tags): Do not keep
pointer to a location within tagname: it may change
after xrealloc. Use byte offset instead.
(dump_file0): Close fd before returning without
dumping the directory.
src/create.c