Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: source/common/udataswp.c

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/udataswp.h ('k') | source/common/uelement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/udataswp.c
diff --git a/source/common/udataswp.c b/source/common/udataswp.c
index 06fe85bc463c0defcf4ee78d1c4995ff89acd6cb..f47ac1f5e06f355b2a457a8cdff2062873c6bd35 100644
--- a/source/common/udataswp.c
+++ b/source/common/udataswp.c
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
@@ -298,7 +300,7 @@ udata_swapDataHeader(const UDataSwapper *ds,
/* check minimum length and magic bytes */
pHeader=(const DataHeader *)inData;
- if( (length>=0 && length<sizeof(DataHeader)) ||
+ if( (length>=0 && length<(int32_t)sizeof(DataHeader)) ||
pHeader->dataHeader.magic1!=0xda ||
pHeader->dataHeader.magic2!=0x27 ||
pHeader->info.sizeofUChar!=2
@@ -425,7 +427,7 @@ udata_openSwapperForInputData(const void *data, int32_t length,
return NULL;
}
if( data==NULL ||
- (length>=0 && length<sizeof(DataHeader)) ||
+ (length>=0 && length<(int32_t)sizeof(DataHeader)) ||
outCharset>U_EBCDIC_FAMILY
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
« no previous file with comments | « source/common/udataswp.h ('k') | source/common/uelement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698