]> granicus.if.org Git - icu/commitdiff
ICU-20244 Fix gcc stringop-overflow warning/error in uloc.cpp.
authorRomain Geissler <romain.geissler@amadeus.com>
Sun, 28 Oct 2018 22:50:51 +0000 (22:50 +0000)
committerShane F. Carr <shane@unicode.org>
Thu, 14 Feb 2019 21:55:54 +0000 (13:55 -0800)
icu4c/source/common/uloc.cpp

index 65694529146a8e568c5241260de2bf86e611a651..a4902effae5e8dc0c31cf2da1bfb97378c92ac3c 100644 (file)
@@ -1591,7 +1591,7 @@ _canonicalize(const char* localeID,
         len = (int32_t)uprv_strlen(d);
 
         if (name != NULL) {
-            uprv_strncpy(name, d, len);
+            uprv_memcpy(name, d, len);
         }
     } else if(_isIDSeparator(*tmpLocaleID)) {
         const char *scriptID;