MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / bufferAccessOutOfBounds_std_ifstream_get

Function bufferAccessOutOfBounds_std_ifstream_get

test/cfg/std.cpp:589–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589void bufferAccessOutOfBounds_std_ifstream_get(std::ifstream& in, std::streambuf& sb)
590{
591 char cBuf[10];
592 // cppcheck-suppress bufferAccessOutOfBounds
593 in.getline(cBuf, 100);
594 // cppcheck-suppress bufferAccessOutOfBounds
595 in.read(cBuf, 100);
596 // cppcheck-suppress bufferAccessOutOfBounds
597 in.readsome(cBuf, 100);
598 // cppcheck-suppress bufferAccessOutOfBounds
599 in.get(cBuf, 100);
600 // cppcheck-suppress bufferAccessOutOfBounds
601 in.get(cBuf, 100, 'a');
602 // cppcheck-suppress bufferAccessOutOfBounds
603 in.getline(cBuf, 100, 'a');
604
605 in.get(sb, 'a');
606
607 in.close();
608}
609
610void invalidFunctionArg_fesetexceptflag(const fexcept_t* flagp, int excepts)
611{

Callers

nothing calls this directly

Calls 3

readMethod · 0.45
getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected