amx_Allot() returns success when it shouldn't
#3

Quote:
Originally Posted by SPAWN_METAL
Посмотреть сообщение
How it affects to plugins? to streamer?
Streamer is OK as it doesn't use these functions. GDK 3.3+ based plugins are fine too as I fixed this internally. Can't say about other plugins, the ones that pass strings or arrays to callbacks are probably affected by this.

Even the server itself can suffer from it - I saw at least one crash report related to this bug. It's pretty easy to trigger:

pawn Код:
#include <a_http>
#include <a_samp>

forward MyHttpResponse(index, response_code, data[]);

main() {
    HTTP(1, HTTP_GET, "www.******.com/search?q=atata", "", "MyHttpResponse");
}

public MyHttpResponse(index, response_code, data[]) {
    printf("Reponse was %d", response_code);
}
The page is clearly bigger than 4 KB, so amx_PushString() will try to write past the top of the stack because it'll think it's OK as amx_Allot() returned no error, which would obviously result in a bad memory access.
Reply


Messages In This Thread
amx_Allot() returns success when it shouldn't - by xeeZ - 20.01.2014, 19:00
Re: amx_Allot() returns success when it shouldn't - by ][Noname][ - 20.01.2014, 20:30
Re: amx_Allot() returns success when it shouldn't - by xeeZ - 21.01.2014, 05:01
Re: amx_Allot() returns success when it shouldn't - by xeeZ - 13.02.2014, 12:57
Re: amx_Allot() returns success when it shouldn't - by Reboma - 13.02.2014, 21:38
Re: amx_Allot() returns success when it shouldn't - by xeeZ - 14.02.2014, 15:34
Re: amx_Allot() returns success when it shouldn't - by Jachu - 14.02.2014, 18:25
Re: amx_Allot() returns success when it shouldn't - by Kar - 09.03.2015, 16:53

Forum Jump:


Users browsing this thread: 2 Guest(s)