Commit e141d4a1 authored by Carlo Bramini's avatar Carlo Bramini Committed by Alexandre Julliard

wintrust: Use return value of sprintf() instead of calling strlen().

parent c7e46b78
...@@ -1894,10 +1894,9 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType, ...@@ -1894,10 +1894,9 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType,
LPSTR pszObjId = *(LPSTR *)pvStructInfo; LPSTR pszObjId = *(LPSTR *)pvStructInfo;
*pszObjId = 0; *pszObjId = 0;
sprintf(pszObjId, "%d.%d", pbEncoded[1 + lenBytes] / 40, pszObjId += sprintf(pszObjId, "%d.%d", pbEncoded[1 + lenBytes] / 40,
pbEncoded[1 + lenBytes] - (pbEncoded[1 + lenBytes] / pbEncoded[1 + lenBytes] - (pbEncoded[1 + lenBytes] /
40) * 40); 40) * 40);
pszObjId += strlen(pszObjId);
for (ptr = pbEncoded + 2 + lenBytes; ret && for (ptr = pbEncoded + 2 + lenBytes; ret &&
ptr - pbEncoded - 1 - lenBytes < dataLen; ) ptr - pbEncoded - 1 - lenBytes < dataLen; )
{ {
...@@ -1912,8 +1911,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType, ...@@ -1912,8 +1911,7 @@ static BOOL WINAPI CRYPT_AsnDecodeOidIgnoreTag(DWORD dwCertEncodingType,
} }
val <<= 7; val <<= 7;
val |= *ptr++; val |= *ptr++;
sprintf(pszObjId, ".%d", val); pszObjId += sprintf(pszObjId, ".%d", val);
pszObjId += strlen(pszObjId);
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment