1
C - C++ / Re: What does this code
« on: October 08, 2015, 01:36:00 pm »Are you new to C++ programming?Yes.
They created a file mapping called WhatTheFile.Thank you very much for your time. And still - WHAT is written in this file? And if i can map to that same file to read or write, how can this be done?
You can take advantage of any language and map to that same file to read or write what's in it.
The function that you're probably trying to cause an exception in is itoa(v3, DstBuf, 10);
This puts the number in v3 (1) into DstBuf and converts it to a string in Base 10 format.
The file mapping to CreateFileMapping is only accessing 256 bytes.
If you map to the file and write past this, you will overwrite the value of v3, which means you can put a string in it and make it crash on itoa.
Thanks for the help!