[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#667904: RFS: mitlm/0.4-1 [ITP] -- MIT Language Modeling



Il 14/01/2013 20:04, Jakub Wilk ha scritto:
> * Giulio Paci <giuliopaci@gmail.com>, 2013-01-14, 01:06:
>>> The ZFile implementation worries me... Do I read it correctly that filenames are passed to shell without any escaping?
>> Unfortunately you are right. Do you have a quick fix in mind?
> 
> Escape them? :)
> 
> It's not difficult if you care only about POSIX-compatible systems (see the attach code snippet). Unfortunately, supporting Windows is a bit more complicated...

I would like the patch to also support Windows. And even better to avoid to call system programs for this task.
I was thinking about implementing this functionality using libarchive, but it would require time (and I do not have much now) to reimplement used standard FILE* functions
using libarchive functions, so maybe there was a quicker solution with the same benefit (i.e., reliability and portability).

In the meanwhile I put your snippet in a patch, so that it can be used for Debian at least. Thank you very much for that code, it is more simple, more clear and probably
more stable, than the escape function I generally use for this task.

Bests,
	Giulio.


Reply to: