I have a small doubt, i'm doing a ctf that provides me only the ELF file. I have been able, using Ghidra to decompile it, but here is the problem:
at a certain point i read:
fread(flag,0x400,1,__stream);
(before there was : __stream = fopen("./flag","rb");
1) I suppose that the "flag" in the fread is where fread stores what "__stream" reads from the flag.txt, but it had never been declared before (i'm referring to "flag" in the fread), is it actually a buffer as i'm expecting? If yes, where are the value that were read stored in the memory (so where is this buffer stored? In the stack?)
2) Is it normal that fread has a 0x400 dimension value and a 1 as the number of elements to read?
Thanks to everyone in advance!