]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/ustrtrns.cpp
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / common / ustrtrns.cpp
index d702aa8fd6befb097e16b128e6fed6724830d548..57cabd58e2a3b8d95f1ba8a892cb004f1da06484 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ******************************************************************************
 *
-*   Copyright (C) 2001-2011, International Business Machines
+*   Copyright (C) 2001-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ******************************************************************************
@@ -1310,7 +1310,7 @@ u_strFromJavaModifiedUTF8WithSub(
     }
 
     /* Faster loop without ongoing checking for pSrcLimit and pDestLimit. */
-    pSrcLimit = pSrc + srcLength;
+    pSrcLimit = (pSrc == NULL) ? NULL : pSrc + srcLength;
     for(;;) {
         count = (int32_t)(pDestLimit - pDest);
         srcLength = (int32_t)(pSrcLimit - pSrc);