[haiku-commits] r40627 - haiku/trunk/src/bin

  • From: jonas@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Feb 2011 01:30:17 +0100 (CET)

Author: kirilla
Date: 2011-02-23 01:30:17 +0100 (Wed, 23 Feb 2011)
New Revision: 40627
Changeset: http://dev.haiku-os.org/changeset/40627

Modified:
   haiku/trunk/src/bin/query.cpp
Log:
Unsafe use of strncpy replaced by strlcpy. CID 2258.

Modified: haiku/trunk/src/bin/query.cpp
===================================================================
--- haiku/trunk/src/bin/query.cpp       2011-02-23 00:08:41 UTC (rev 40626)
+++ haiku/trunk/src/bin/query.cpp       2011-02-23 00:30:17 UTC (rev 40627)
@@ -117,7 +117,7 @@
                                sAllVolumes = true;
                                break;
                        case 'v':
-                               strncpy(volumePath, optarg, B_FILE_NAME_LENGTH);
+                               strlcpy(volumePath, optarg, B_FILE_NAME_LENGTH);
                                break;
 
                        default:


Other related posts:

  • » [haiku-commits] r40627 - haiku/trunk/src/bin - jonas