MemCheck tutorial: find buffer overruns

  1. Set your dpr's code to:
    var
        P: PChar;

    begin
        MemChk;

        P:= StrAlloc(8);
        StrPCopy(P, 'MemCheck');
        StrDispose(P);
    end.
  2. Run. MemCheck tells you that you misused the buffer.

 




Last update: March 2001