29.04.2015, 19:53
https://sampwiki.blast.hk/wiki/Fread
Invalid file handle can crash the server. What I mean by that can be shown better with the example below:
In order to get the exact line: https://github.com/Zeex/samp-plugin-...ith-debug-info
Also update crashdetect to 4.15.1 instead of 4.13.1 version you loaded, update sscanf and add nativechecker last to be loaded to get rid of the messages.
Invalid file handle can crash the server. What I mean by that can be shown better with the example below:
pawn Код:
// WRONG WAY:
new File: fhandle = fopen(...);
fread(fhandle, string);
fclose(fhandle);
pawn Код:
// CORRECT WAY:
new File: fhandle = fopen(...);
if (fhandle) // if valid file handle
{
fread(fhandle, string);
fclose(fhandle);
}
Also update crashdetect to 4.15.1 instead of 4.13.1 version you loaded, update sscanf and add nativechecker last to be loaded to get rid of the messages.

