]> cygwin.com Git - cygwin-apps/cygutils.git/commitdiff
Fix mkshortcut bug
authorCharles Wilson <cygwin@cwilson.fastmail.fm>
Thu, 3 Dec 2009 08:19:44 +0000 (08:19 +0000)
committerCharles Wilson <cygwin@cwilson.fastmail.fm>
Thu, 3 Dec 2009 08:19:44 +0000 (08:19 +0000)
ChangeLog
src/mkshortcut/mkshortcut.c

index 89ffedc2dad4bec1497507f5c8d76771c46c764f..590cc48466f5dbe58c9a9ad05698285465329b26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-03  Dave Korn  <dave.korn.cygwin@googlemail.com>
+
+       Fix mkshortcut bug.
+       * src/mkshortcut/mkshortcut.c (mkshortcut): Fix off-
+       by-one error.
+
 2009-11-21  Charles Wilson  <cwilson@...>
 
        Release 1.4.1
index 6519a497917fc202883bedd6304ff665cdf3cca9..4553eb68dae51ef5ce5cf50c9ebc055614131d86 100644 (file)
@@ -549,7 +549,7 @@ mkshortcut (optvals opts, poptContext optCon)
       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
     {
This page took 0.408524 seconds and 5 git commands to generate.