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

[Pkg-fonts-devel] Bug#590844: A fix

On Fri, Jul 30, 2010 at 9:23 AM, Theppitak Karoonboonyanan
<thep@debian.org> wrote:
> On Thu, Jul 29, 2010 at 09:23:59PM +0300, Kęstutis Bilūnas wrote:
>> Thank you for this report and the patch, but it seems that the upstream
>> have already corrected tis bug in the version 20100501. This was done a
>> little differently (see
>> http://fontforge.cvs.sourceforge.net/viewvc/fontforge/fontforge/gutils/),
>> but I checked and it works well with the relative path in command line
>> argument.
> Thanks for your checking. However, the upstream savestrcpy(), is not actually
> safe when dest > src. We are just lucky that that's not the case. But who
> knows if it would be in the future. (I don't know why it's also used in
> GFileBuildName(), but that may imply other existing use cases.) For me, I'd
> prefer memmove() implementation instead.

I mean something like:

static void savestrcpy(char *dest, const char *src) {
    memmove(dest, src, strlen(src)+1);

Theppitak Karoonboonyanan

Reply to: