1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

100l, compute correctly poll_table size when allocating

Originally committed as revision 15238 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-09-07 04:16:05 +00:00
parent 4fce284c08
commit a7f361eb13

View File

@ -545,7 +545,7 @@ static int http_server(void)
struct pollfd *poll_table, *poll_entry;
HTTPContext *c, *c_next;
if(!(poll_table = av_mallocz(nb_max_http_connections + 2))) {
if(!(poll_table = av_mallocz((nb_max_http_connections + 2)*sizeof(*poll_table)))) {
http_log("Impossible to allocate a poll table handling %d connections.\n", nb_max_http_connections);
return -1;
}