This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: 1.7.1 release date?
Dave Korn wrote:
> Found it. Patch shortly. Off by one setting the terminating NUL in the
> MAX_PATH-size buffers in mkshortcut().
Verified. Attached. HTH :)
cheers,
DaveK
diff -pur origsrc/cygutils-1.4.1/src/mkshortcut/mkshortcut.c src/cygutils-1.4.1/src/mkshortcut/mkshortcut.c
--- origsrc/cygutils-1.4.1/src/mkshortcut/mkshortcut.c 2009-05-07 00:00:20.000000000 +0100
+++ src/cygutils-1.4.1/src/mkshortcut/mkshortcut.c 2009-12-02 00:57:57.593750000 +0000
@@ -549,7 +549,7 @@ mkshortcut (optvals opts, poptContext op
strncpy (desc, opts.desc_arg, MAX_PATH);
/* There won't be a null terminated if strlen(desc_arg)>MAX_PATH */
- desc[MAX_PATH] = '\0';
+ desc[MAX_PATH - 1] = '\0';
}
else
{