diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2016-12-09 00:51:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 00:51:19 +0100 |
commit | e58e3c5e0a527802bd5286c537dc3ed603317c1d (patch) | |
tree | dabb0caf55c65bfe141a91de2c64a4c22a3682c5 /src/ildasm | |
parent | bf4ed11eb5cee7123fd0c6fa5b60f09fe7adf23e (diff) | |
download | coreclr-e58e3c5e0a527802bd5286c537dc3ed603317c1d.tar.gz coreclr-e58e3c5e0a527802bd5286c537dc3ed603317c1d.tar.bz2 coreclr-e58e3c5e0a527802bd5286c537dc3ed603317c1d.zip |
Remove sscanf and sprintf usage (#8508)
* Remove sscanf
* Remove sprintf
Diffstat (limited to 'src/ildasm')
-rw-r--r-- | src/ildasm/dis.cpp | 6 | ||||
-rw-r--r-- | src/ildasm/dres.cpp | 4 | ||||
-rw-r--r-- | src/ildasm/gui.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/ildasm/dis.cpp b/src/ildasm/dis.cpp index ad5e5a7141..371466feee 100644 --- a/src/ildasm/dis.cpp +++ b/src/ildasm/dis.cpp @@ -475,7 +475,7 @@ void dumpOneEHInfo(DasmExceptionInfoClause* ehInfo, IMDInternalImport *pImport, /* if(ehInfo->GetFlags() & ERR_OUT_OF_CODE) { - sprintf(szString,"%s// WARNING: Boundary outside the method code",g_szAsmCodeIndent); + _snprintf_s(szString, _countof(szString), _TRUNCATE, "%s// WARNING: Boundary outside the method code",g_szAsmCodeIndent); printLine(GUICookie,szString); } */ @@ -863,8 +863,8 @@ BOOL SourceLinesHelper(void *GUICookie, LineCodeDescr* pLCD, __out_ecount(nSize) /* BOOL fHasEmbeddedSource=FALSE; ((ISymUnmanagedDocument*)(pParam->pLCD->FileToken))->HasEmbeddedSource(&fHasEmbeddedSource); - sprintf(szString,"%s// PDB has %sembedded source",g_szAsmCodeIndent, - fHasEmbeddedSource ? "" : "no "); + _snprintf_s(szString, _countof(szString), _TRUNCATE, "%s// PDB has %sembedded source",g_szAsmCodeIndent, + fHasEmbeddedSource ? "" : "no "); printLine(pParam->GUICookie,szString); */ } diff --git a/src/ildasm/dres.cpp b/src/ildasm/dres.cpp index 0f23fcc036..53e1925cea 100644 --- a/src/ildasm/dres.cpp +++ b/src/ildasm/dres.cpp @@ -281,11 +281,11 @@ DWORD DumpResourceToFile(__in __nullterminated WCHAR* wzFileName) void* GUICookie = (void*)wzFileName; BYTE* pbData; printLine(GUICookie,""); - sprintf(szString,"// ========== Win32 Resource Entries (%d) ========",ulNumResNodes); + sprintf_s(szString, _countof(szString), "// ========== Win32 Resource Entries (%d) ========",ulNumResNodes); for(i=0; i < ulNumResNodes; i++) { printLine(GUICookie,""); - sprintf(szString,"// Res.# %d Type=0x%X Name=0x%X Lang=0x%X DataOffset=0x%X DataLength=%d", + sprintf_s(szString, _countof(szString), "// Res.# %d Type=0x%X Name=0x%X Lang=0x%X DataOffset=0x%X DataLength=%d", i+1, g_prResNodePtr[i]->ResHdr.dwTypeID, g_prResNodePtr[i]->ResHdr.dwNameID, diff --git a/src/ildasm/gui.cpp b/src/ildasm/gui.cpp index f5f141d279..83501e66ef 100644 --- a/src/ildasm/gui.cpp +++ b/src/ildasm/gui.cpp @@ -2256,7 +2256,7 @@ void FindTextInListbox(HWND hwnd, FINDREPLACEW* lpfr) if(pos >= 0) { //char sz[32]; - //sprintf(sz,"%d:%d",strFind.chrg.cpMin,strFind.chrg.cpMax); + //sprintf_s(sz, _countof(sz), "%d:%d",strFind.chrg.cpMin,strFind.chrg.cpMax); //MessageBox(hwnd,sz,"Find",MB_OK); SendMessage(hwndLB,EM_SETSEL,(WPARAM)pos,(LPARAM)(pos+wcslen(lpfr->lpstrFindWhat))); } |