summaryrefslogtreecommitdiff
path: root/src/ildasm
diff options
context:
space:
mode:
Diffstat (limited to 'src/ildasm')
-rw-r--r--src/ildasm/dis.cpp6
-rw-r--r--src/ildasm/dres.cpp4
-rw-r--r--src/ildasm/gui.cpp2
-rw-r--r--src/ildasm/windasm.cpp40
4 files changed, 27 insertions, 25 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)));
}
diff --git a/src/ildasm/windasm.cpp b/src/ildasm/windasm.cpp
index d8a28812b7..57f779fd50 100644
--- a/src/ildasm/windasm.cpp
+++ b/src/ildasm/windasm.cpp
@@ -383,27 +383,29 @@ int ProcessOneArg(__in __nullterminated char* szArg, __out char** ppszObjFileNam
}
else if ((_stricmp(szOpt, "met") == 0)&&g_fTDC)
{
- if(g_fTDC)
+#ifdef FEATURE_CORECLR
+ printf("Warning: 'METADATA' option is ignored for ildasm on CoreCLR.\n");
+#else
+
+ char *pStr = EqualOrColon(szArg);
+ g_fDumpMetaInfo = TRUE;
+ if(pStr)
{
- char *pStr = EqualOrColon(szArg);
- g_fDumpMetaInfo = TRUE;
- if(pStr)
- {
- char szOptn[64];
- strncpy_s(szOptn, 64, pStr+1,10);
- szOptn[3] = 0; // recognize metainfo specifier by first 3 chars
- if (_stricmp(szOptn, "hex") == 0) g_ulMetaInfoFilter |= MDInfo::dumpMoreHex;
- else if(_stricmp(szOptn, "csv") == 0) g_ulMetaInfoFilter |= MDInfo::dumpCSV;
- else if(_stricmp(szOptn, "mdh") == 0) g_ulMetaInfoFilter |= MDInfo::dumpHeader;
- else if(_stricmp(szOptn, "raw") == 0) g_ulMetaInfoFilter |= MDInfo::dumpRaw;
- else if(_stricmp(szOptn, "hea") == 0) g_ulMetaInfoFilter |= MDInfo::dumpRawHeaps;
- else if(_stricmp(szOptn, "sch") == 0) g_ulMetaInfoFilter |= MDInfo::dumpSchema;
- else if(_stricmp(szOptn, "unr") == 0) g_ulMetaInfoFilter |= MDInfo::dumpUnsat;
- else if(_stricmp(szOptn, "val") == 0) g_ulMetaInfoFilter |= MDInfo::dumpValidate;
- else if(_stricmp(szOptn, "sta") == 0) g_ulMetaInfoFilter |= MDInfo::dumpStats;
- else return -1;
- }
+ char szOptn[64];
+ strncpy_s(szOptn, 64, pStr+1,10);
+ szOptn[3] = 0; // recognize metainfo specifier by first 3 chars
+ if (_stricmp(szOptn, "hex") == 0) g_ulMetaInfoFilter |= MDInfo::dumpMoreHex;
+ else if(_stricmp(szOptn, "csv") == 0) g_ulMetaInfoFilter |= MDInfo::dumpCSV;
+ else if(_stricmp(szOptn, "mdh") == 0) g_ulMetaInfoFilter |= MDInfo::dumpHeader;
+ else if(_stricmp(szOptn, "raw") == 0) g_ulMetaInfoFilter |= MDInfo::dumpRaw;
+ else if(_stricmp(szOptn, "hea") == 0) g_ulMetaInfoFilter |= MDInfo::dumpRawHeaps;
+ else if(_stricmp(szOptn, "sch") == 0) g_ulMetaInfoFilter |= MDInfo::dumpSchema;
+ else if(_stricmp(szOptn, "unr") == 0) g_ulMetaInfoFilter |= MDInfo::dumpUnsat;
+ else if(_stricmp(szOptn, "val") == 0) g_ulMetaInfoFilter |= MDInfo::dumpValidate;
+ else if(_stricmp(szOptn, "sta") == 0) g_ulMetaInfoFilter |= MDInfo::dumpStats;
+ else return -1;
}
+#endif // FEATURE_CORECLR
}
else if (_stricmp(szOpt, "obj") == 0)
{