[haiku-commits] r40649 - haiku/trunk/src/kits/tracker

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 24 Feb 2011 02:09:24 +0100 (CET)

Author: stpere
Date: 2011-02-24 02:09:24 +0100 (Thu, 24 Feb 2011)
New Revision: 40649
Changeset: http://dev.haiku-os.org/changeset/40649

Modified:
   haiku/trunk/src/kits/tracker/PoseView.cpp
Log:
If the template name was long enough, we would have exceeded the string size.

CID 9046


Modified: haiku/trunk/src/kits/tracker/PoseView.cpp
===================================================================
--- haiku/trunk/src/kits/tracker/PoseView.cpp   2011-02-23 22:31:44 UTC (rev 
40648)
+++ haiku/trunk/src/kits/tracker/PoseView.cpp   2011-02-24 01:09:24 UTC (rev 
40649)
@@ -3167,7 +3167,7 @@
                return;
 
        char fileName[B_FILE_NAME_LENGTH] = "New ";
-       strcat(fileName, message->FindString("name"));
+       strlcat(fileName, message->FindString("name"), sizeof(fileName));
        FSMakeOriginalName(fileName, &destDir, " copy");
 
        entry_ref srcRef;


Other related posts:

  • » [haiku-commits] r40649 - haiku/trunk/src/kits/tracker - stpere